diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-09-30 01:55:02 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-09-30 02:03:23 +0200 |
commit | 8d805929b1541a071048b55b22d110f166809939 (patch) | |
tree | f1abd3dbbe68ae70ffd60b3b0518d75d72662d50 | |
parent | 0dfc4c84d84bd4f8cfb7ecc18bc7958f20b99a6c (diff) | |
download | u-boot-8d805929b1541a071048b55b22d110f166809939.zip u-boot-8d805929b1541a071048b55b22d110f166809939.tar.gz u-boot-8d805929b1541a071048b55b22d110f166809939.tar.bz2 |
efi_loader: fix efi_initrd_deregister()
Don't try to delete a non-existent handle.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r-- | lib/efi_loader/efi_load_initrd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_load_initrd.c b/lib/efi_loader/efi_load_initrd.c index c5e6652..3d6044f 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; } |