aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2007-03-12 16:41:45 -0400
committerPaul Mackerras <paulus@samba.org>2007-03-13 06:15:50 -0400
commitc8aa72633e65c5c215b0cdd9970642e2a4f9a9a3 (patch)
tree05e7ea880e68580fe654c1d4f6e50c0f52acc703 /arch/powerpc/boot
parent1c53a496ba6132a37f052aa907e23445b3fe928c (diff)
[POWERPC] bootwrapper: Make ft_get_phandle() accept and return NULL.
Currently, if ft_get_phandle() is passed NULL it will allocate an entry for it and return a non-NULL phandle. This patch makes it simply pass the NULL through. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r--arch/powerpc/boot/flatdevtree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c
index 971420af08d4..6c1877358aed 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;