of/fdt: Don't copy garbage after "/" in root node path
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 22 Oct 2012 00:32:30 +0000 (11:32 +1100)
committerRob Herring <rob.herring@calxeda.com>
Sun, 11 Nov 2012 03:53:04 +0000 (21:53 -0600)
commit509b7455ef87e1447670c51037cabbf93d772d6f
tree718e3272e16c80a722bfdb053c39052712289143
parent2066306099d35430d01ed1b3d81c0536d77bf390
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>
drivers/of/fdt.c