diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2022-10-16 11:36:32 +0300 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-10-16 13:23:22 +0300 |
commit | 70089c13a73f58315547982573be2016e7a70958 (patch) | |
tree | 905752b31d7b4161ed2f166b3d1ab0d98c07333c /cmd | |
parent | f4d52c41595b8af1813413020773b5d59f226622 (diff) | |
download | u-boot-70089c13a73f58315547982573be2016e7a70958.tar.xz |
efi_loader: remove efi_delete_handle on loadfile2
Loadfile2 code is installing two protocols on it's own handle
and uses efi_delete_handle() to clean it up on failure(s). However
commit 05c4c9e21ae6 ("efi_loader: define internal implementations of
install/uninstallmultiple") prepares the ground for us to clean up
efi_delete_handle() used in favor of Install/UninstallMultipleProtocol.
While at it clean up the non needed void casts to (void *) on the
protolcol installation.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootefi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index b93c0d3d4c..2a7d42925d 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -394,8 +394,10 @@ static efi_status_t do_bootefi_exec(efi_handle_t handle, void *load_options) out: free(load_options); - if (IS_ENABLED(CONFIG_EFI_LOAD_FILE2_INITRD)) - efi_initrd_deregister(); + if (IS_ENABLED(CONFIG_EFI_LOAD_FILE2_INITRD)) { + if (efi_initrd_deregister() != EFI_SUCCESS) + log_err("Failed to remove loadfile2 for initrd\n"); + } /* Control is returned to U-Boot, disable EFI watchdog */ efi_set_watchdog(0); |