diff options
author | Tom Rini <trini@konsulko.com> | 2019-09-21 07:31:23 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-09-21 07:31:23 -0400 |
commit | 390183b58179ddaf986422f4d9446c596660f7e0 (patch) | |
tree | d2401285ea91806eeac338eeaf721d855c896f4b /lib/efi_loader/efi_boottime.c | |
parent | d6c7309f561ac832c080e5ec07b0af9c8da319a8 (diff) | |
parent | 79907a4f8429aef161add59b3d026cf2c734c1aa (diff) |
Merge tag 'efi-2019-10-rc4-5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for v2019.10-rc4 (5)
This patch set fixes errors in the UEFI sub-system and adds a function to
compare u16 strings which is prerequisite for further patches.
Diffstat (limited to 'lib/efi_loader/efi_boottime.c')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index b9bff894cb..493d906c64 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -3499,7 +3499,6 @@ static efi_status_t EFIAPI efi_disconnect_controller( efi_handle_t *child_handle_buffer = NULL; size_t number_of_children = 0; efi_status_t r; - size_t stop_count = 0; struct efi_object *efiobj; EFI_ENTRY("%p, %p, %p", controller_handle, driver_image_handle, @@ -3539,32 +3538,35 @@ static efi_status_t EFIAPI efi_disconnect_controller( (void **)&binding_protocol, driver_image_handle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL)); - if (r != EFI_SUCCESS) + if (r != EFI_SUCCESS) { + r = EFI_INVALID_PARAMETER; goto out; + } /* Remove the children */ if (number_of_children) { r = EFI_CALL(binding_protocol->stop(binding_protocol, controller_handle, number_of_children, child_handle_buffer)); - if (r == EFI_SUCCESS) - ++stop_count; + if (r != EFI_SUCCESS) { + r = EFI_DEVICE_ERROR; + goto out; + } } /* Remove the driver */ - if (!child_handle) + if (!child_handle) { r = EFI_CALL(binding_protocol->stop(binding_protocol, controller_handle, 0, NULL)); - if (r == EFI_SUCCESS) - ++stop_count; + if (r != EFI_SUCCESS) { + r = EFI_DEVICE_ERROR; + goto out; + } + } EFI_CALL(efi_close_protocol(driver_image_handle, &efi_guid_driver_binding_protocol, driver_image_handle, NULL)); - - if (stop_count) - r = EFI_SUCCESS; - else - r = EFI_NOT_FOUND; + r = EFI_SUCCESS; out: if (!child_handle) free(child_handle_buffer); |