diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-01-20 22:57:46 +0100 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-01-23 07:56:53 +0100 |
commit | 6e8c28cf523257acba5d6ccb4328253595640931 (patch) | |
tree | f161b76e47d2beb568493b8a8e13a0c45006947b | |
parent | 041f0af3668e037f465d0e80ea5561fb3fbaa7d0 (diff) | |
download | u-boot-6e8c28cf523257acba5d6ccb4328253595640931.tar.gz |
efi_loader: fix efi_load_image_from_path()
Use the correct GUID when closing the file load protocol.
Remove an unnecessary check (Coverity CID 316363).
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index b2cb0160c0..18ca96791c 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1990,10 +1990,7 @@ efi_status_t efi_load_image_from_path(bool boot_policy, if (ret != EFI_SUCCESS) efi_free_pages(addr, pages); out: - if (load_file_protocol) - EFI_CALL(efi_close_protocol(device, - &efi_guid_load_file2_protocol, - efi_root, NULL)); + EFI_CALL(efi_close_protocol(device, guid, efi_root, NULL)); if (ret == EFI_SUCCESS) { *buffer = (void *)(uintptr_t)addr; *size = buffer_size; |