diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2019-03-06 14:23:52 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-03-08 11:31:44 -0500 |
commit | e1d7ed34015a78788ada8a79d23a2af22fe1f451 (patch) | |
tree | 21fc24758c1daff59e671fc260a3e3ceb583c8a5 /common | |
parent | c8087f67f148e8e732e8d456d93cc709116ce0b5 (diff) | |
download | u-boot-e1d7ed34015a78788ada8a79d23a2af22fe1f451.tar.gz |
image: fdt: handle coalesced reserve region
Handle in boot_fdt_reserve_region
any return value > 0 of lmb_reserve() function;
it occurs when coalesced region are found:
adjacent reserved region are merged.
This patch avoid the error trace:
ERROR: reserving fdt memory region failed..
when reserved region are merged (return value = 1).
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/image-fdt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c index 94089b2215..01186aeac7 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -71,10 +71,10 @@ static const image_header_t *image_get_fdt(ulong fdt_addr) static void boot_fdt_reserve_region(struct lmb *lmb, uint64_t addr, uint64_t size) { - int ret; + long ret; ret = lmb_reserve(lmb, addr, size); - if (!ret) { + if (ret >= 0) { debug(" reserving fdt memory region: addr=%llx size=%llx\n", (unsigned long long)addr, (unsigned long long)size); } else { |