[PATCH 1/1] of: add NULL parameter check for of_device_is_available
David Miller
davem at davemloft.net
Wed Mar 14 07:34:19 EST 2012
From: Dong Aisheng <b29396 at freescale.com>
Date: Tue, 13 Mar 2012 19:40:05 +0800
> From: Dong Aisheng <dong.aisheng at linaro.org>
>
> This function will return 1 even the device node passed in
> is NULL which is a little error-prone.
> Change to return 0 if the device node passed in is NULL.
>
> Signed-off-by: Dong Aisheng <dong.aisheng at linaro.org>
I think this is a hard error and therefore BUG_ON(!device) is
more appropriate.
More information about the devicetree-discuss
mailing list