aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Heng <liheng40@huawei.com>2020-07-20 15:22:18 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-26 10:31:06 +0200
commit2ff3c97b47521d6700cc6485c7935908dcd2c27c (patch)
tree2fff457671632f94121b60ea2a382f32e15b12d9
parentfa80b284d706f445e353255db0f943e9b4b797cc (diff)
downloadlinux-yocto-2ff3c97b47521d6700cc6485c7935908dcd2c27c.tar.gz
linux-yocto-2ff3c97b47521d6700cc6485c7935908dcd2c27c.tar.bz2
linux-yocto-2ff3c97b47521d6700cc6485c7935908dcd2c27c.zip
efi: add missed destroy_workqueue when efisubsys_init fails
commit 98086df8b70c06234a8f4290c46064e44dafa0ed upstream. destroy_workqueue() should be called to destroy efi_rts_wq when efisubsys_init() init resources fails. Cc: <stable@vger.kernel.org> Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Li Heng <liheng40@huawei.com> Link: https://lore.kernel.org/r/1595229738-10087-1-git-send-email-liheng40@huawei.com Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/firmware/efi/efi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index de1bc38ab39f..a8180f9090fa 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -359,6 +359,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;
}
@@ -395,6 +396,7 @@ err_unregister:
generic_ops_unregister();
err_put:
kobject_put(efi_kobj);
+ destroy_workqueue(efi_rts_wq);
return error;
}