summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-10-17 19:41:15 -0600
committerMichal Simek <michal.simek@xilinx.com>2015-11-04 14:49:51 +0100
commit9d8ac956af304072dd11054e2b981ac3770ca49b (patch)
treeaf1861326a3a7b9d6d975646cca67a041e839b11 /lib
parent3bc37a50e0db9978c6fbb1b2b6c3a351cebe631e (diff)
downloadu-boot-imx-9d8ac956af304072dd11054e2b981ac3770ca49b.zip
u-boot-imx-9d8ac956af304072dd11054e2b981ac3770ca49b.tar.gz
u-boot-imx-9d8ac956af304072dd11054e2b981ac3770ca49b.tar.bz2
fdt: Correct handling of alias regions
At present the last four bytes of the alias region are dropped in the case where the last alias is included. This results in a corrupted device tree. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/libfdt/fdt_region.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfdt/fdt_region.c b/lib/libfdt/fdt_region.c
index 9fea775..747d8bb 100644
--- a/lib/libfdt/fdt_region.c
+++ b/lib/libfdt/fdt_region.c
@@ -101,7 +101,7 @@ int fdt_add_alias_regions(const void *fdt, struct fdt_region *region, int count,
continue;
next = fdt_next_property_offset(fdt, offset);
if (next < 0)
- next = node_end - sizeof(fdt32_t);
+ next = node_end;
if (!did_alias_header) {
fdt_add_region(info, base + node, 12);