All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] efi_loader: Delete() return EFI_WARN_DELETE_FAILURE
@ 2019-06-17 20:04 Heinrich Schuchardt
  0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2019-06-17 20:04 UTC (permalink / raw)
  To: u-boot

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 | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 182d735e6b..36ca719a82 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);
 }

--
2.20.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-17 20:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 20:04 [U-Boot] [PATCH 1/1] efi_loader: Delete() return EFI_WARN_DELETE_FAILURE Heinrich Schuchardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.