summaryrefslogtreecommitdiff
path: root/boot/image-fdt.c
diff options
context:
space:
mode:
authorIlias Apalodimas <[email protected]>2024-10-23 18:22:00 +0300
committerTom Rini <[email protected]>2024-10-29 16:17:47 -0600
commit0f57b009e649e9d140b7f662599a5ace506e2418 (patch)
tree22083d34e326c8312b87964726d00536f418c3bc /boot/image-fdt.c
parent92e75ee47f12131306b6a0c501bf8b7cedfe3818 (diff)
lmb: Fix lmb_add_region_flags() return codes and testing
The function description says this should return 0 or -1 on failures. When regions coalesce though this returns the number of coalescedregions which is confusing and requires special handling of the return code. On top of that no one is using the number of coalesced regions. So let's just return 0 on success and adjust our selftests accordingly Signed-off-by: Ilias Apalodimas <[email protected]> Reviewed-by: Caleb Connolly <[email protected]>
Diffstat (limited to 'boot/image-fdt.c')
-rw-r--r--boot/image-fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 9a1fa8840d7..3d5b6f9e2dc 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -73,7 +73,7 @@ static void boot_fdt_reserve_region(u64 addr, u64 size, enum lmb_flags flags)
long ret;
ret = lmb_reserve_flags(addr, size, flags);
- if (ret >= 0) {
+ if (!ret) {
debug(" reserving fdt memory region: addr=%llx size=%llx flags=%x\n",
(unsigned long long)addr,
(unsigned long long)size, flags);