public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppc32: Fix type/bug in pmac_feature.c
@ 2004-09-24  0:25 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2004-09-24  0:25 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list

Hi !

A typo in pmac_feature.c can cause us to use a bogus node pointer when
iterating the i2c controllers during boot. Fortunately, it seems that
we always find the one we are looking for first, and thus never ended
up in an inifinite loop here, but let's fix it and fix the warning at
the same time.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

===== arch/ppc/platforms/pmac_feature.c 1.26 vs edited =====
--- 1.26/arch/ppc/platforms/pmac_feature.c	2004-06-23 06:04:07 +10:00
+++ edited/arch/ppc/platforms/pmac_feature.c	2004-09-24 10:23:15 +10:00
@@ -2665,7 +2665,7 @@
 			struct device_node *p = of_get_parent(ui2c);
 			if (p && !strcmp(p->name, "uni-n"))
 				break;
-			ui2c = of_find_node_by_type(np, "i2c");
+			ui2c = of_find_node_by_type(ui2c, "i2c");
 		}
 		if (ui2c == NULL)
 			break;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-24  0:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-24  0:25 [PATCH] ppc32: Fix type/bug in pmac_feature.c Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox