linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/19] bootwrapper: Make ft_get_phandle() accept and return NULL.
@ 2007-03-12 20:41 Scott Wood
  2007-03-12 22:36 ` Mark A. Greer
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Wood @ 2007-03-12 20:41 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

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>
---
 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 971420a..6c18773 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)
 {
 	unsigned int i;
 
+	if (!node)
+		return NULL;
+
 	for (i = 1; i < cxt->nodes_used; i++)	/* already there? */
 		if (cxt->node_tbl[i] == node)
 			return (void *)i;
-- 
1.5.0.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 05/19] bootwrapper: Make ft_get_phandle() accept and return NULL.
  2007-03-12 20:41 [PATCH 05/19] bootwrapper: Make ft_get_phandle() accept and return NULL Scott Wood
@ 2007-03-12 22:36 ` Mark A. Greer
  0 siblings, 0 replies; 2+ messages in thread
From: Mark A. Greer @ 2007-03-12 22:36 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev, paulus

On Mon, Mar 12, 2007 at 02:41:45PM -0600, Scott Wood wrote:
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-12 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-12 20:41 [PATCH 05/19] bootwrapper: Make ft_get_phandle() accept and return NULL Scott Wood
2007-03-12 22:36 ` Mark A. Greer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).