]> git.baikalelectronics.ru Git - kernel.git/commit
[OPENPROMIO]: Handle current_node being NULL correctly.
authorDavid S. Miller <davem@sunset.davemloft.net>
Mon, 18 Sep 2006 08:47:13 +0000 (01:47 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 18 Sep 2006 08:47:13 +0000 (01:47 -0700)
commit08b7e99401acef8e6a75bad97a32d7f0760738ac
tree2d28434f793807b4a83bd5dc139e165c7c317389
parent174de82769852846a3bd1a8a32c88542fdf00354
[OPENPROMIO]: Handle current_node being NULL correctly.

If the user tries to traverse to the next node of the
last node, we get NULL in current_node and a zero phandle
returned.  That's fine, but if the user tries to obtain
properties in that state, we try to dereference a NULL
pointer in the downcall to the of_*() routines.

So protect against that.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/sbus/char/openprom.c