mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
efi_loader: correct ExitBootServices()
Always use EFI_EXIT() to return from the function. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
1d3e8dc792
commit
98967379b6
1 changed files with 8 additions and 5 deletions
|
@ -1933,16 +1933,19 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
|
||||||
efi_uintn_t map_key)
|
efi_uintn_t map_key)
|
||||||
{
|
{
|
||||||
struct efi_event *evt;
|
struct efi_event *evt;
|
||||||
|
efi_status_t ret = EFI_SUCCESS;
|
||||||
|
|
||||||
EFI_ENTRY("%p, %zx", image_handle, map_key);
|
EFI_ENTRY("%p, %zx", image_handle, map_key);
|
||||||
|
|
||||||
/* Check that the caller has read the current memory map */
|
/* Check that the caller has read the current memory map */
|
||||||
if (map_key != efi_memory_map_key)
|
if (map_key != efi_memory_map_key) {
|
||||||
return EFI_INVALID_PARAMETER;
|
ret = EFI_INVALID_PARAMETER;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if ExitBootServices has already been called */
|
/* Check if ExitBootServices has already been called */
|
||||||
if (!systab.boottime)
|
if (!systab.boottime)
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
goto out;
|
||||||
|
|
||||||
/* Stop all timer related activities */
|
/* Stop all timer related activities */
|
||||||
timers_enabled = false;
|
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 */
|
/* Give the payload some time to boot */
|
||||||
efi_set_watchdog(0);
|
efi_set_watchdog(0);
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
out:
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
return EFI_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue