From 05f4647b10233dd2e18106abb16ff7fb68abbd08 Mon Sep 17 00:00:00 2001 From: Ricky Liang Date: Tue, 14 Apr 2015 12:36:05 +0800 Subject: [PATCH] of/fdt: fix allocation size for device node path The allocation size of device node path is off by one which drops the '\0' terminator. Signed-off-by: Ricky Liang Signed-off-by: Rob Herring --- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 4b15aa163b6e..cde35c5d0191 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -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 -- 2.39.2