diff options
Diffstat (limited to 'boot/efi')
| -rw-r--r-- | boot/efi/protocol.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/boot/efi/protocol.c b/boot/efi/protocol.c index 6bf8123..b033022 100644 --- a/boot/efi/protocol.c +++ b/boot/efi/protocol.c @@ -14,12 +14,7 @@ void *efi_get_protocol(EFI_HANDLE handle, EFI_GUID *guid) nullptr, EFI_OPEN_PROTOCOL_GET_PROTOCOL); - if (EFI_ERROR(efi_errno)) - { - return nullptr; - } - - return protocol; + return !EFI_ERROR(efi_errno) ? protocol : nullptr; } void efi_close_protocol(EFI_HANDLE handle, EFI_GUID *guid) |
