]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] Add null pointer check to of_find_property
authorTimur Tabi <timur@freescale.com>
Wed, 7 May 2008 19:19:59 +0000 (05:19 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 15 May 2008 10:49:49 +0000 (20:49 +1000)
commit61496dfe2b8f62cdeafc9661e21ec0fcbad8a9fb
treef47b0659fa97f798fa05708e4ea9ecc3e6d136cc
parent5268f2ec06cc5d69e1b9c526e164c532bdae6905
[POWERPC] Add null pointer check to of_find_property

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.

Without this, the legacy_serial driver will crash if there's no
'chosen' node in the device tree.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/of/base.c