diff mbox series

[U-Boot,1/1] efi_loader: error code inUninstallProtocolInterface()

Message ID 20190510181158.13822-1-xypron.glpk@gmx.de
State Accepted, archived
Commit 96aa99cded0096bd6c6ea2919e6884c54c80f095
Delegated to: Heinrich Schuchardt
Headers show
Series [U-Boot,1/1] efi_loader: error code inUninstallProtocolInterface() | expand

Commit Message

Heinrich Schuchardt May 10, 2019, 6:11 p.m. UTC
According to the UEFI specification UninstallProtocolInteface() has to
return EFI_NOT_FOUND if the interface is not found.

Correct the return value.

Cf. UEFI SCT II spec (2017), 3.3.2 UninstallProtocolInterface(), 5.1.3.2.4

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/efi_loader/efi_boottime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.20.1
diff mbox series

Patch

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 7263b2e0a7..375a4bd149 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -514,7 +514,7 @@  efi_status_t efi_remove_protocol(const efi_handle_t handle,
 	if (ret != EFI_SUCCESS)
 		return ret;
 	if (handler->protocol_interface != protocol_interface)
-		return EFI_INVALID_PARAMETER;
+		return EFI_NOT_FOUND;
 	list_del(&handler->link);
 	free(handler);
 	return EFI_SUCCESS;