summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_boottime.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-09 14:10:51 -0400
committerTom Rini <trini@konsulko.com>2022-09-09 15:07:05 -0400
commita5fc388ed966974256bc03b3d4db7ae1be0ed119 (patch)
tree5be3ecc2ce3483ea3134746aeb46017489efbcf6 /lib/efi_loader/efi_boottime.c
parente9de8c8c649044080371399a1ef4923b08632611 (diff)
parent8cf8ad353345cc4a92288b5136e7d714d2bdde4a (diff)
Merge tag 'efi-2022-10-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-10-rc5 Documentation: * man-page for tftpput UEFI: * fix driver binding protocol for block IO devices * don't delete invalid handles * add a unit test for the EFI Conformance Profile Table Other: * correct short text for tftpboot
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 4da64b5d296..6f7333638ae 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);
}