efi_add_memory_map() now returns efi_status_t not the passed uint64_t address on success. We need to capture that change in efi_free_pages().
Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- lib/efi_loader/efi_memory.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index 4ce3dd8f8c..57016a393b 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -501,13 +501,11 @@ efi_status_t efi_free_pages(uint64_t memory, efi_uintn_t pages) return EFI_INVALID_PARAMETER; } - r = efi_add_memory_map(memory, pages, EFI_CONVENTIONAL_MEMORY, false); - /* Merging of adjacent free regions is missing */ - - if (r == memory) - return EFI_SUCCESS; + ret = efi_add_memory_map(memory, pages, EFI_CONVENTIONAL_MEMORY, false); + if (ret != EFI_SUCCESS) + return EFI_NOT_FOUND; - return EFI_NOT_FOUND; + return ret; } /** -- 2.22.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot