[U-Boot] [PATCH v2 1/1] efi_loader: check parameter new_handle of efi_file_open()

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Sep 15 18:43:46 UTC 2018


We should not check parameter file twice.
We should check parameter new_handle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
v2
	remove spurious '#define DEBUG 1'
---
 lib/efi_loader/efi_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index e090cf017c..0753a36a20 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -218,7 +218,7 @@ static efi_status_t EFIAPI efi_file_open(struct efi_file_handle *file,
 		  open_mode, attributes);
 
 	/* Check parameters */
-	if (!file || !file || !file_name) {
+	if (!file || !new_handle || !file_name) {
 		ret = EFI_INVALID_PARAMETER;
 		goto out;
 	}
-- 
2.18.0



More information about the U-Boot mailing list