diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-11 20:05:40 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-14 19:18:39 +0200 |
commit | 98967379b645d7232d4eca22c3b80eaa94a7d7d7 (patch) | |
tree | bd71b96dcc8a734d93d967817ea8c3135577373a /lib | |
parent | 1d3e8dc7920d7fa32d4df76adea4809890a6de6c (diff) | |
download | u-boot-98967379b645d7232d4eca22c3b80eaa94a7d7d7.zip u-boot-98967379b645d7232d4eca22c3b80eaa94a7d7d7.tar.gz u-boot-98967379b645d7232d4eca22c3b80eaa94a7d7d7.tar.bz2 |
efi_loader: correct ExitBootServices()
Always use EFI_EXIT() to return from the function.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 275850a..b26291b 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1933,16 +1933,19 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle, efi_uintn_t map_key) { struct efi_event *evt; + efi_status_t ret = EFI_SUCCESS; EFI_ENTRY("%p, %zx", image_handle, map_key); /* Check that the caller has read the current memory map */ - if (map_key != efi_memory_map_key) - return EFI_INVALID_PARAMETER; + if (map_key != efi_memory_map_key) { + ret = EFI_INVALID_PARAMETER; + goto out; + } /* Check if ExitBootServices has already been called */ if (!systab.boottime) - return EFI_EXIT(EFI_SUCCESS); + goto out; /* Stop all timer related activities */ timers_enabled = false; @@ -1990,8 +1993,8 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle, /* Give the payload some time to boot */ efi_set_watchdog(0); WATCHDOG_RESET(); - - return EFI_EXIT(EFI_SUCCESS); +out: + return EFI_EXIT(ret); } /** |