Commit 514fb5be authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: always initialise dn->type and dn->name

This fix comes from ppc32. Always initialise dn->type and dn->name so
that code doesnt have to check for NULL everywhere. There is at least
one bug report where we oopsed because of this.
parent 8509eb5e
......@@ -1926,6 +1926,11 @@ finish_node(struct device_node *np, unsigned long mem_start,
np->name = get_property(np, "name", 0);
np->type = get_property(np, "device_type", 0);
if (!np->name)
np->name = "<NULL>";
if (!np->type)
np->type = "<NULL>";
/* get the device addresses and interrupts */
if (ifunc != NULL)
mem_start = ifunc(np, mem_start, naddrc, nsizec);
......
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