From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Tue, 11 Jun 2019 17:00:56 +0000 (+0200)
Subject: efi_loader: LoadImage must return EFI_NOT_FOUND
X-Git-Tag: v2025.01-rc5-pxa1908~2927^2~11
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/%7B%7B?a=commitdiff_plain;h=200000387c2d16fa069af6e176d1fcb886024f4d;p=u-boot.git

efi_loader: LoadImage must return EFI_NOT_FOUND

If the file path does not relate to an existing file, LoadImage() must
return EFI_NOT_FOUND.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 7bb0fc2e52..251dfc4ecc 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1779,7 +1779,7 @@ efi_status_t efi_load_image_from_path(struct efi_device_path *file_path,
 	/* Open file */
 	f = efi_file_from_path(file_path);
 	if (!f)
-		return EFI_DEVICE_ERROR;
+		return EFI_NOT_FOUND;
 
 	/* Get file size */
 	bs = 0;