Commit c8aa7263 authored by Scott Wood's avatar Scott Wood Committed by Paul Mackerras

[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: default avatarScott Wood <scottwood@freescale.com>
Acked-by: default avatarMark A. Greer <mgreer@mvista.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 1c53a496
...@@ -40,6 +40,9 @@ static void *ft_get_phandle(struct ft_cxt *cxt, char *node) ...@@ -40,6 +40,9 @@ static void *ft_get_phandle(struct ft_cxt *cxt, char *node)
{ {
unsigned int i; unsigned int i;
if (!node)
return NULL;
for (i = 1; i < cxt->nodes_used; i++) /* already there? */ for (i = 1; i < cxt->nodes_used; i++) /* already there? */
if (cxt->node_tbl[i] == node) if (cxt->node_tbl[i] == node)
return (void *)i; return (void *)i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment