diff options
author | Simon Glass <sjg@chromium.org> | 2015-10-17 19:41:15 -0600 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2015-11-04 14:49:51 +0100 |
commit | 9d8ac956af304072dd11054e2b981ac3770ca49b (patch) | |
tree | af1861326a3a7b9d6d975646cca67a041e839b11 /lib | |
parent | 3bc37a50e0db9978c6fbb1b2b6c3a351cebe631e (diff) |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfdt/fdt_region.c b/lib/libfdt/fdt_region.c index 9fea775a970..747d8bb86aa 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); |