public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/1] efi_loader: fix efi_initrd_deregister()
@ 2022-09-29 23:57 Heinrich Schuchardt
  2022-09-30  1:47 ` AKASHI Takahiro
  2022-09-30  6:15 ` Ilias Apalodimas
  0 siblings, 2 replies; 10+ messages in thread
From: Heinrich Schuchardt @ 2022-09-29 23:57 UTC (permalink / raw)
  To: Ilias Apalodimas; +Cc: u-boot, Heinrich Schuchardt

Don't try to delete a non-existent handle.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 lib/efi_loader/efi_load_initrd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/efi_loader/efi_load_initrd.c b/lib/efi_loader/efi_load_initrd.c
index c5e6652e66..3d6044f760 100644
--- a/lib/efi_loader/efi_load_initrd.c
+++ b/lib/efi_loader/efi_load_initrd.c
@@ -230,6 +230,9 @@ efi_status_t efi_initrd_register(void)
  */
 void efi_initrd_deregister(void)
 {
+	if (!efi_initrd_handle)
+		return;
+
 	efi_delete_handle(efi_initrd_handle);
 	efi_initrd_handle = NULL;
 }
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-09-30  7:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-29 23:57 [PATCH 1/1] efi_loader: fix efi_initrd_deregister() Heinrich Schuchardt
2022-09-30  1:47 ` AKASHI Takahiro
2022-09-30  6:18   ` Ilias Apalodimas
2022-09-30  6:41     ` AKASHI Takahiro
2022-09-30  6:54       ` Ilias Apalodimas
2022-09-30  7:18         ` Heinrich Schuchardt
2022-09-30  7:29           ` Ilias Apalodimas
2022-09-30  7:55             ` Heinrich Schuchardt
2022-09-30  7:59               ` Ilias Apalodimas
2022-09-30  6:15 ` Ilias Apalodimas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox