[PATCH] ppc32: Fix type/bug in pmac_feature.c

From: Benjamin Herrenschmidt
Date: Thu Sep 23 2004 - 19:43:21 EST


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@xxxxxxxxxxxxxxxxxxx>

===== 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;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/