Skip to content
Snippets Groups Projects
Commit 9d8ac956 authored by Simon Glass's avatar Simon Glass Committed by Michal Simek
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 3bc37a50
No related branches found
No related tags found
No related merge requests found
...@@ -101,7 +101,7 @@ int fdt_add_alias_regions(const void *fdt, struct fdt_region *region, int count, ...@@ -101,7 +101,7 @@ int fdt_add_alias_regions(const void *fdt, struct fdt_region *region, int count,
continue; continue;
next = fdt_next_property_offset(fdt, offset); next = fdt_next_property_offset(fdt, offset);
if (next < 0) if (next < 0)
next = node_end - sizeof(fdt32_t); next = node_end;
if (!did_alias_header) { if (!did_alias_header) {
fdt_add_region(info, base + node, 12); fdt_add_region(info, base + node, 12);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment