summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/dtc/libfdt/fdt_sw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dtc/libfdt/fdt_sw.c b/scripts/dtc/libfdt/fdt_sw.c
index 6d33cc29d0..d8ef748a72 100644
--- a/scripts/dtc/libfdt/fdt_sw.c
+++ b/scripts/dtc/libfdt/fdt_sw.c
@@ -114,7 +114,7 @@ int fdt_resize(void *fdt, void *buf, int bufsize)
FDT_SW_CHECK_HEADER(fdt);
- headsize = fdt_off_dt_struct(fdt);
+ headsize = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
tailsize = fdt_size_dt_strings(fdt);
if ((headsize + tailsize) > bufsize)