aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-06-17 22:00:13 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-06-20 22:26:19 +0000
commitfa390810e1fc6b80f936f57c4bed4a7056f18296 (patch)
tree6bc7f24bb8f80e76d080722cbaec9719decb9faf /lib
parentc974ab0ecb1c47678219395d053d385b7f5b61f0 (diff)
downloadu-boot-fa390810e1fc6b80f936f57c4bed4a7056f18296.zip
u-boot-fa390810e1fc6b80f936f57c4bed4a7056f18296.tar.gz
u-boot-fa390810e1fc6b80f936f57c4bed4a7056f18296.tar.bz2
efi_loader: Delete() return EFI_WARN_DELETE_FAILURE
If EFI_FILE_PROTOCOL.Delete() fails, always close the handle and return EFI_WARN_DELETE_FAILURE. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_file.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 182d735..36ca719 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -307,16 +307,10 @@ static efi_status_t EFIAPI efi_file_delete(struct efi_file_handle *file)
EFI_ENTRY("%p", file);
- if (set_blk_dev(fh)) {
- ret = EFI_DEVICE_ERROR;
- goto error;
- }
+ if (set_blk_dev(fh) || fs_unlink(fh->path))
+ ret = EFI_WARN_DELETE_FAILURE;
- if (fs_unlink(fh->path))
- ret = EFI_DEVICE_ERROR;
file_close(fh);
-
-error:
return EFI_EXIT(ret);
}