summaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_boottime.c2
-rw-r--r--lib/efi_loader/efi_memory.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 1f598b357a..e533a185f8 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -208,7 +208,7 @@ static void efi_process_event_queue(void)
*/
static void efi_queue_event(struct efi_event *event)
{
- struct efi_event *item = NULL;
+ struct efi_event *item;
if (!event->notify_function)
return;
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];