PCI: endpoint: fix missing destroy_workqueue()
Subsystems (2)
PATCH 1/1 PCI: endpoint: fix missing destroy_workqueue()
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 <[email protected]>
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/pci/endpoint/functions/pci-epf-test.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pci/endpoint/functions/pci-epf-test.c +3 -0
@@ -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);
Signature · 1 line
2.25.1
Lorenzo Pieralisi
AppliedQuoted 3 lines · Yang Yingliang
Add the missing
destroy_workqueue()before return frompci_epf_test_init()in the error handling case and adddestroy_workqueue()inpci_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