diff options
author | Tom Rini <trini@konsulko.com> | 2020-03-12 12:51:44 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-03-12 12:51:44 -0400 |
commit | db3b1818b7a9711084255713ec14cb886eb79b12 (patch) | |
tree | 01fc163d773a4b4b2e53a432fd5b1f9839e8e360 /lib/efi_loader/efi_memory.c | |
parent | 6e3cd0a3845cbba7e49f48b2ec326564986bfb9b (diff) | |
parent | bc40eb278b0c14b990556eab34a57b2b8ed598f4 (diff) |
Merge tag 'efi-2020-04-rc4-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-04-rc4 (3)
This pull request provides the hardware RNG driver for Amlogic systems needed
for the EFI_RNG_PROTOCOL.
Furthermore bug fixes are provided:
* correct an error message in the efidebug command
* correct an error in the 'efidebug rm' command
* remove an unnecessary assignment in efi_queue_event()
Diffstat (limited to 'lib/efi_loader/efi_memory.c')
-rw-r--r-- | lib/efi_loader/efi_memory.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index 89adf20310..97d90f069a 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -627,18 +627,18 @@ efi_status_t efi_get_memory_map(efi_uintn_t *memory_map_size, *memory_map_size = map_size; - if (provided_map_size < map_size) - return EFI_BUFFER_TOO_SMALL; - - if (!memory_map) - return EFI_INVALID_PARAMETER; - if (descriptor_size) *descriptor_size = sizeof(struct efi_mem_desc); if (descriptor_version) *descriptor_version = EFI_MEMORY_DESCRIPTOR_VERSION; + if (provided_map_size < map_size) + return EFI_BUFFER_TOO_SMALL; + + if (!memory_map) + return EFI_INVALID_PARAMETER; + /* Copy list into array */ /* Return the list in ascending order */ memory_map = &memory_map[map_entries - 1]; |