* [PATCH -next] PCI: endpoint: fix missing destroy_workqueue()
@ 2021-03-31 8:40 Yang Yingliang
2021-04-13 10:45 ` Lorenzo Pieralisi
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-03-31 8:40 UTC (permalink / raw)
To: linux-kernel, linux-pci; +Cc: bhelgaas, kishon
Add the missing destroy_workqueue() before return from
pci_epf_test_init() in the error handling case and add
destroy_workqueue() in pci_epf_test_exit().
Fixes: 349e7a85b25fa ("PCI: endpoint: functions: Add an EP function to test PCI")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/pci/endpoint/functions/pci-epf-test.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index 63d5f5c6e3e0..8e24b5e50e4b 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -922,6 +922,7 @@ static int __init pci_epf_test_init(void)
ret = pci_epf_register_driver(&test_driver);
if (ret) {
+ destroy_workqueue(kpcitest_workqueue);
pr_err("Failed to register pci epf test driver --> %d\n", ret);
return ret;
}
@@ -932,6 +933,8 @@ module_init(pci_epf_test_init);
static void __exit pci_epf_test_exit(void)
{
+ if (kpcitest_workqueue)
+ destroy_workqueue(kpcitest_workqueue);
pci_epf_unregister_driver(&test_driver);
}
module_exit(pci_epf_test_exit);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] PCI: endpoint: fix missing destroy_workqueue()
2021-03-31 8:40 [PATCH -next] PCI: endpoint: fix missing destroy_workqueue() Yang Yingliang
@ 2021-04-13 10:45 ` Lorenzo Pieralisi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2021-04-13 10:45 UTC (permalink / raw)
To: linux-kernel, linux-pci, Yang Yingliang
Cc: Lorenzo Pieralisi, bhelgaas, kishon
On Wed, 31 Mar 2021 16:40:12 +0800, Yang Yingliang wrote:
> Add the missing destroy_workqueue() before return from
> pci_epf_test_init() in the error handling case and add
> destroy_workqueue() in pci_epf_test_exit().
Applied to pci/endpoint, thanks!
[1/1] PCI: endpoint: Fix missing destroy_workqueue()
https://git.kernel.org/lpieralisi/pci/c/acaef7981a
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-13 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 8:40 [PATCH -next] PCI: endpoint: fix missing destroy_workqueue() Yang Yingliang
2021-04-13 10:45 ` Lorenzo Pieralisi
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).