mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
Fix off-by-one error in passing initrd end address via device tree
The initrd_end variable contains the address immediately *after* the initrd blob, not the last address containing data. This patch fixes an inadvertent off-by-one when setting up the initrd reserved map. Signed-off-by: Grant Likely <grant.likely@linaro.org>
This commit is contained in:
parent
ed59e58786
commit
ce6b27a874
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force)
|
|||
}
|
||||
}
|
||||
|
||||
err = fdt_add_mem_rsv(fdt, initrd_start, initrd_end - initrd_start + 1);
|
||||
err = fdt_add_mem_rsv(fdt, initrd_start, initrd_end - initrd_start);
|
||||
if (err < 0) {
|
||||
printf("fdt_initrd: %s\n", fdt_strerror(err));
|
||||
return err;
|
||||
|
|
Loading…
Add table
Reference in a new issue