aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-10-21 20:32:30 -0400
committerRob Herring <rob.herring@calxeda.com>2012-11-10 22:53:04 -0500
commit509b7455ef87e1447670c51037cabbf93d772d6f (patch)
tree718e3272e16c80a722bfdb053c39052712289143 /drivers/of
parent2066306099d35430d01ed1b3d81c0536d77bf390 (diff)
of/fdt: Don't copy garbage after "/" in root node path
The root node path must be internally converted to "/", or various pieces of code looking for it that way will fail. The code to do that however had a bug where we might incorrectly append pieces of the original path from the fdt to the "/". We should probably add a proper dedicated accessor for the root node but in the meantime this patch should fix it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/fdt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 91a375fb6ae6..c2b08dcdbc53 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -186,6 +186,7 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
186 */ 186 */
187 fpsize = 1; 187 fpsize = 1;
188 allocl = 2; 188 allocl = 2;
189 l = 0;
189 } else { 190 } else {
190 /* account for '/' and path size minus terminal 0 191 /* account for '/' and path size minus terminal 0
191 * already in 'l' 192 * already in 'l'