[PATCH v2 1/2] efi/libstub: Print error message if efi_allocate_bootparams() fails
Khalid Ali
khaliidcaliy at gmail.com
Sun Jul 6 02:57:00 PDT 2025
From: Khalid Ali <khaliidcaliy at gmail.com>
Print error message in case efi_allocate_bootparams() fails before exit.
Change the direct call of efi_exit() to "goto fail". This allows the
general error message in "fail" label to get printed.
Signed-off-by: Khalid Ali <khaliidcaliy at gmail.com>
---
drivers/firmware/efi/libstub/x86-stub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index cafc90d4caaf..13d8eba06e4b 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -824,7 +824,7 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
if (!IS_ENABLED(CONFIG_EFI_HANDOVER_PROTOCOL) || !boot_params) {
status = efi_allocate_bootparams(handle, &boot_params);
if (status != EFI_SUCCESS)
- efi_exit(handle, status);
+ goto fail;
}
hdr = &boot_params->hdr;
--
2.49.0
More information about the linux-riscv
mailing list