aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_boottime.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-19 13:19:39 -0400
committerTom Rini <trini@konsulko.com>2022-09-19 16:07:12 -0400
commite9a1ff9724348408144c7f1c5b5cc26130ba46e5 (patch)
tree68b56f117206d121b4a7e567b0209c02283c98e6 /lib/efi_loader/efi_boottime.c
parentb6c50e5831f6ce3800d4b3cf3c7aa35dde8c48d9 (diff)
parentf76f3e3b44328fe6229650540109af93750fd5f0 (diff)
Merge branch 'master' into next
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib/efi_loader/efi_boottime.c')
-rw-r--r--lib/efi_loader/efi_boottime.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 8da3bb29aa..1bfd094e89 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -619,9 +619,14 @@ efi_status_t efi_remove_all_protocols(const efi_handle_t handle)
*/
void efi_delete_handle(efi_handle_t handle)
{
- if (!handle)
+ efi_status_t ret;
+
+ ret = efi_remove_all_protocols(handle);
+ if (ret == EFI_INVALID_PARAMETER) {
+ log_err("Can't remove invalid handle %p\n", handle);
return;
- efi_remove_all_protocols(handle);
+ }
+
list_del(&handle->link);
free(handle);
}