Message ID | 20211229185759.1432518-13-sjg@chromium.org |
---|---|
State | Accepted, archived |
Commit | bc53a35ac526c575a91c12af21f7106d54f7a496 |
Delegated to: | Heinrich Schuchardt |
Headers | show |
Series | efi: Improvements to U-Boot running on top of UEFI | expand |
On 12/29/21 19:57, Simon Glass wrote: > 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> > --- > > (no changes since v6) > > 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 8bd710d2e95..30af414069d 100644 > --- a/lib/efi/efi_app.c > +++ b/lib/efi/efi_app.c > @@ -299,8 +299,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); Please, document the return value of efi_init() in include/efi.h. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > + if (ret) { > + printf("Failed to set up U-Boot: err=%lx\n", ret); > + return ret; > + } > efi_set_priv(priv); > > /*
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 8bd710d2e95..30af414069d 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -299,8 +299,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); /*
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> --- (no changes since v6) Changes in v6: - Use 'U-Boot' instead of 'ARP' typo lib/efi/efi_app.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)