mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 14:41:26 +01:00
efi_loader: HandleProtocol parameter checks
HandleProtocol() and OpenProtocol() have to return EFI_UNSUPPORTED if the protocol is not installed on the handle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
529886a097
commit
e7c3cd6b67
@ -2636,8 +2636,15 @@ static efi_status_t EFIAPI efi_open_protocol
|
|||||||
}
|
}
|
||||||
|
|
||||||
r = efi_search_protocol(handle, protocol, &handler);
|
r = efi_search_protocol(handle, protocol, &handler);
|
||||||
if (r != EFI_SUCCESS)
|
switch (r) {
|
||||||
|
case EFI_SUCCESS:
|
||||||
|
break;
|
||||||
|
case EFI_NOT_FOUND:
|
||||||
|
r = EFI_UNSUPPORTED;
|
||||||
goto out;
|
goto out;
|
||||||
|
default:
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
r = efi_protocol_open(handler, protocol_interface, agent_handle,
|
r = efi_protocol_open(handler, protocol_interface, agent_handle,
|
||||||
controller_handle, attributes);
|
controller_handle, attributes);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user