Commit 8d94d622 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

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

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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f577fd03
...@@ -2665,7 +2665,7 @@ set_initial_features(void) ...@@ -2665,7 +2665,7 @@ set_initial_features(void)
struct device_node *p = of_get_parent(ui2c); struct device_node *p = of_get_parent(ui2c);
if (p && !strcmp(p->name, "uni-n")) if (p && !strcmp(p->name, "uni-n"))
break; break;
ui2c = of_find_node_by_type(np, "i2c"); ui2c = of_find_node_by_type(ui2c, "i2c");
} }
if (ui2c == NULL) if (ui2c == NULL)
break; break;
......
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