linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: functions/pci-epf-test: fix missing destroy_workqueue() on error in pci_epf_test_init
@ 2020-10-28  9:15 Qinglang Miao
  2021-01-18 12:47 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 3+ messages in thread
From: Qinglang Miao @ 2020-10-28  9:15 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Lorenzo Pieralisi, Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Qinglang Miao

Add the missing destroy_workqueue() before return from
pci_epf_test_init() in the error handling case.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/pci/endpoint/functions/pci-epf-test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index e4e51d884..6854f2525 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -918,6 +918,7 @@ static int __init pci_epf_test_init(void)
 	ret = pci_epf_register_driver(&test_driver);
 	if (ret) {
 		pr_err("Failed to register pci epf test driver --> %d\n", ret);
+		destroy_workqueue(kpcitest_workqueue);
 		return ret;
 	}
 
-- 
2.23.0


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

* Re: [PATCH] PCI: functions/pci-epf-test: fix missing destroy_workqueue() on error in pci_epf_test_init
  2020-10-28  9:15 [PATCH] PCI: functions/pci-epf-test: fix missing destroy_workqueue() on error in pci_epf_test_init Qinglang Miao
@ 2021-01-18 12:47 ` Lorenzo Pieralisi
  2021-01-19  7:16   ` Kishon Vijay Abraham I
  0 siblings, 1 reply; 3+ messages in thread
From: Lorenzo Pieralisi @ 2021-01-18 12:47 UTC (permalink / raw)
  To: Qinglang Miao, kishon; +Cc: Bjorn Helgaas, linux-pci, linux-kernel

On Wed, Oct 28, 2020 at 05:15:49PM +0800, Qinglang Miao wrote:
> Add the missing destroy_workqueue() before return from
> pci_epf_test_init() in the error handling case.
> 
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
>  drivers/pci/endpoint/functions/pci-epf-test.c | 1 +
>  1 file changed, 1 insertion(+)

Need Kishon's ack.

Lorenzo

> diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
> index e4e51d884..6854f2525 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-test.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-test.c
> @@ -918,6 +918,7 @@ static int __init pci_epf_test_init(void)
>  	ret = pci_epf_register_driver(&test_driver);
>  	if (ret) {
>  		pr_err("Failed to register pci epf test driver --> %d\n", ret);
> +		destroy_workqueue(kpcitest_workqueue);
>  		return ret;
>  	}
>  
> -- 
> 2.23.0
> 

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

* Re: [PATCH] PCI: functions/pci-epf-test: fix missing destroy_workqueue() on error in pci_epf_test_init
  2021-01-18 12:47 ` Lorenzo Pieralisi
@ 2021-01-19  7:16   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2021-01-19  7:16 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Qinglang Miao; +Cc: Bjorn Helgaas, linux-pci, linux-kernel

Hi Qinglang,

On 18/01/21 6:17 pm, Lorenzo Pieralisi wrote:
> On Wed, Oct 28, 2020 at 05:15:49PM +0800, Qinglang Miao wrote:
>> Add the missing destroy_workqueue() before return from
>> pci_epf_test_init() in the error handling case.
>>
>> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
>> ---
>>  drivers/pci/endpoint/functions/pci-epf-test.c | 1 +
>>  1 file changed, 1 insertion(+)
> 
> Need Kishon's ack.
> 
> Lorenzo

Can you also add destroy_workqueue() in pci_epf_test_exit()?

Thank You,
Kishon

> 
>> diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
>> index e4e51d884..6854f2525 100644
>> --- a/drivers/pci/endpoint/functions/pci-epf-test.c
>> +++ b/drivers/pci/endpoint/functions/pci-epf-test.c
>> @@ -918,6 +918,7 @@ static int __init pci_epf_test_init(void)
>>  	ret = pci_epf_register_driver(&test_driver);
>>  	if (ret) {
>>  		pr_err("Failed to register pci epf test driver --> %d\n", ret);
>> +		destroy_workqueue(kpcitest_workqueue);
>>  		return ret;
>>  	}
>>  
>> -- 
>> 2.23.0
>>

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

end of thread, other threads:[~2021-01-19  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28  9:15 [PATCH] PCI: functions/pci-epf-test: fix missing destroy_workqueue() on error in pci_epf_test_init Qinglang Miao
2021-01-18 12:47 ` Lorenzo Pieralisi
2021-01-19  7:16   ` Kishon Vijay Abraham I

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).