linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] efi/libstub: Print error message if efi_allocate_bootparams() fails
@ 2025-07-06  9:57 Khalid Ali
  2025-07-06 10:01 ` [PATCH v2 2/2] efi/libstub: Print uefi status code on error messages Khalid Ali
  0 siblings, 1 reply; 5+ messages in thread
From: Khalid Ali @ 2025-07-06  9:57 UTC (permalink / raw)
  To: ardb, paul.walmsley, palmer, aou, alex
  Cc: gargaditya08, jonathan, kees, linux-efi, linux-riscv, lukas,
	linux-kernel, Khalid Ali

From: Khalid Ali <khaliidcaliy@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@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


^ permalink raw reply related	[flat|nested] 5+ messages in thread
[parent not found: <20250706094354.1282-1-khaliidcaliy@gmail.com>]

end of thread, other threads:[~2025-07-06 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-06  9:57 [PATCH v2 1/2] efi/libstub: Print error message if efi_allocate_bootparams() fails Khalid Ali
2025-07-06 10:01 ` [PATCH v2 2/2] efi/libstub: Print uefi status code on error messages Khalid Ali
2025-07-06 13:24   ` kernel test robot
     [not found] <20250706094354.1282-1-khaliidcaliy@gmail.com>
2025-07-06  9:58 ` Khalid Ali
2025-07-06 10:08 ` Khalid Ali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).