]> git.karo-electronics.de Git - linux-beck.git/commitdiff
of/fdt: fix allocation size for device node path
authorRicky Liang <jcliang@chromium.org>
Tue, 14 Apr 2015 04:36:05 +0000 (12:36 +0800)
committerRob Herring <robh@kernel.org>
Wed, 15 Apr 2015 00:35:45 +0000 (19:35 -0500)
The allocation size of device node path is off by one which drops the
'\0' terminator.

Signed-off-by: Ricky Liang <jcliang@chromium.org>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/fdt.c

index 4b15aa163b6ef6c92660d96bc95fadeee897f192..cde35c5d0191bd5950c7953d5b8e88a2d139306f 100644 (file)
@@ -191,7 +191,7 @@ static void * unflatten_dt_node(void *blob,
        if (!pathp)
                return mem;
 
-       allocl = l++;
+       allocl = ++l;
 
        /* version 0x10 has a more compact unit name here instead of the full
         * path. we accumulate the full path size using "fpsize", we'll rebuild