[PATCH v6 15/27] efi: Check for failure when initing the app
    Simon Glass 
    sjg at chromium.org
       
    Fri Dec 17 20:40:47 CET 2021
    
    
  
The stub checks for failure with efi_init(). Add this for the app as well.
It is unlikely that anything can be done, but we may as well stop.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v6:
- Use 'U-Boot' instead of 'ARP' typo
 lib/efi/efi_app.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index 2024ecc37b6..2a6740b836a 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -318,8 +318,11 @@ efi_status_t EFIAPI efi_main(efi_handle_t image,
 	efi_status_t ret;
 
 	/* Set up access to EFI data structures */
-	efi_init(priv, "App", image, sys_table);
-
+	ret = efi_init(priv, "App", image, sys_table);
+	if (ret) {
+		printf("Failed to set up U-Boot: err=%lx\n", ret);
+		return ret;
+	}
 	efi_set_priv(priv);
 
 	/*
-- 
2.34.1.173.g76aa8bc2d0-goog
    
    
More information about the U-Boot
mailing list