[PATCH] Add null pointer check to of_find_property

Timur Tabi timur at freescale.com
Tue May 13 02:46:46 EST 2008

Timur Tabi wrote:
> Update function of_find_property() to return NULL if the device_node passed
> to it is also NULL.  Otherwise, passing NULL will cause a null pointer
> dereference.
> Signed-off-by: Timur Tabi <timur at freescale.com>

Paul, please pick this up for 2.6.26.  The legacy_serial driver will crash
without it if there's no 'chosen' node in the device tree.  I'm sure there are
other drivers that would crash similarly if given a device tree with missing nodes.

Timur Tabi
Linux kernel developer at Freescale

More information about the Linuxppc-dev mailing list