From: Li Heng <liheng40@huawei.com>
To: <ardb@kernel.org>
Cc: <linux-efi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<rui.xiang@huawei.com>
Subject: [PATCH] efi: add missed destroy_workqueue when efisubsys_init fails
Date: Mon, 20 Jul 2020 15:22:18 +0800 [thread overview]
Message-ID: <1595229738-10087-1-git-send-email-liheng40@huawei.com> (raw)
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
next reply other threads:[~2020-07-20 7:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 7:22 Li Heng [this message]
2020-08-22 13:39 ` [tip: efi/urgent] efi: add missed destroy_workqueue when efisubsys_init fails tip-bot2 for Li Heng
2020-07-23 6:28 [PATCH] " Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1595229738-10087-1-git-send-email-liheng40@huawei.com \
--to=liheng40@huawei.com \
--cc=ardb@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rui.xiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).