diff options
-rw-r--r-- | arch/powerpc/boot/flatdevtree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index 971420af08d..6c1877358ae 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c | |||
@@ -40,6 +40,9 @@ static void *ft_get_phandle(struct ft_cxt *cxt, char *node) | |||
40 | { | 40 | { |
41 | unsigned int i; | 41 | unsigned int i; |
42 | 42 | ||
43 | if (!node) | ||
44 | return NULL; | ||
45 | |||
43 | for (i = 1; i < cxt->nodes_used; i++) /* already there? */ | 46 | for (i = 1; i < cxt->nodes_used; i++) /* already there? */ |
44 | if (cxt->node_tbl[i] == node) | 47 | if (cxt->node_tbl[i] == node) |
45 | return (void *)i; | 48 | return (void *)i; |