mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] efi: add missed destroy_workqueue when efisubsys_init fails
@ 2020-07-20  7:22 Li Heng
  2020-08-22 13:39 ` [tip: efi/urgent] " tip-bot2 for Li Heng
  0 siblings, 1 reply; 2+ messages in thread
From: Li Heng @ 2020-07-20  7:22 UTC (permalink / raw)
  To: ardb; +Cc: linux-efi, linux-kernel, rui.xiang

destroy_workqueue() should be called to destroy efi_rts_wq
when efisubsys_init() init resources fails.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Li Heng <liheng40@huawei.com>
---
 drivers/firmware/efi/efi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 5114cae..f8cce41 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -379,6 +379,7 @@ static int __init efisubsys_init(void)
 	efi_kobj = kobject_create_and_add("efi", firmware_kobj);
 	if (!efi_kobj) {
 		pr_err("efi: Firmware registration failed.\n");
+		destroy_workqueue(efi_rts_wq);
 		return -ENOMEM;
 	}
 
@@ -420,6 +421,7 @@ static int __init efisubsys_init(void)
 		generic_ops_unregister();
 err_put:
 	kobject_put(efi_kobj);
+	destroy_workqueue(efi_rts_wq);
 	return error;
 }
 
-- 
2.7.4


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

end of thread, other threads:[~2020-08-22 13:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  7:22 [PATCH] efi: add missed destroy_workqueue when efisubsys_init fails Li Heng
2020-08-22 13:39 ` [tip: efi/urgent] " tip-bot2 for Li Heng

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

all inboxes | Powered by JetHome®