Message ID | 20190714230108.25764-8-pure.logic@nexus-software.ie |
---|---|
State | Superseded, archived |
Delegated to: | Heinrich Schuchardt |
Headers | show |
Series | efi_loader: Fix inconsistencies in efi_add_memory_map usage | expand |
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index c19256e00d..04d3e3e4a7 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -169,8 +169,8 @@ static void efi_carve_out_dt_rsv(void *fdt) pages = efi_size_in_pages(size + (addr & EFI_PAGE_MASK)); addr &= ~EFI_PAGE_MASK; - if (!efi_add_memory_map(addr, pages, EFI_RESERVED_MEMORY_TYPE, - false)) + if (efi_add_memory_map(addr, pages, EFI_RESERVED_MEMORY_TYPE, + false) != EFI_SUCCESS) printf("FDT memrsv map %d: Failed to add to map\n", i); } }
The return type of efi_add_memory_map() has been updated to return efi_status_t as a result we should check the return of efi_add_memory_map() against EFI_SUCCESS as opposed to the original input addr parameter. This change will also remove this error message on raspberrypi 3 boot: "FDT memrsv map 0: Failed to add to map". Fixes: 416e07e2cfcf ("efi: Drop error return in efi_carve_out_dt_rsv()") Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Alexander Graf <agraf@csgraf.de> Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> --- cmd/bootefi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)