]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi: Check for failure when initing the app
authorSimon Glass <sjg@chromium.org>
Wed, 29 Dec 2021 18:57:47 +0000 (11:57 -0700)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 31 Dec 2021 05:50:40 +0000 (06:50 +0100)
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@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi/efi_app.c

index 214cef943019b032a3cc880dea17c258cbc70570..32ed5a0d04653046f23955705deb08e8ca55d20a 100644 (file)
@@ -300,8 +300,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);
 
        /*