Skip to content

Commit 98086df

Browse files
Li Hengardbiesheuvel
authored andcommitted
efi: add missed destroy_workqueue when efisubsys_init fails
destroy_workqueue() should be called to destroy efi_rts_wq when efisubsys_init() init resources fails. Cc: <[email protected]> Reported-by: Hulk Robot <[email protected]> Signed-off-by: Li Heng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent c8502eb commit 98086df

File tree

1 file changed

+2
-0
lines changed
  • drivers/firmware/efi

1 file changed

+2
-0
lines changed

drivers/firmware/efi/efi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ static int __init efisubsys_init(void)
381381
efi_kobj = kobject_create_and_add("efi", firmware_kobj);
382382
if (!efi_kobj) {
383383
pr_err("efi: Firmware registration failed.\n");
384+
destroy_workqueue(efi_rts_wq);
384385
return -ENOMEM;
385386
}
386387

@@ -424,6 +425,7 @@ static int __init efisubsys_init(void)
424425
generic_ops_unregister();
425426
err_put:
426427
kobject_put(efi_kobj);
428+
destroy_workqueue(efi_rts_wq);
427429
return error;
428430
}
429431

0 commit comments

Comments
 (0)