]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: Delete() return EFI_WARN_DELETE_FAILURE
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 17 Jun 2019 20:00:13 +0000 (22:00 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 20 Jun 2019 22:26:19 +0000 (22:26 +0000)
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>
lib/efi_loader/efi_file.c

index 182d735e6bc28cadf6a83823cdb5d344020480e0..36ca719a82fde2b33b181203bd1a8146ec720e37 100644 (file)
@@ -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);
 }