efi_loader: fix efi_initrd_deregister()
Don't try to delete a non-existent handle. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
0dfc4c84d8
commit
8d805929b1
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue