cxgb4: remove workqueue when driver registration fails
Subsystems (3)
PATCH 1/1 cxgb4: remove workqueue when driver registration fails
When driver registration fails, we need to clean up the resources allocated before. cxgb4 missed to destroy the workqueue allocated at the very beginning.
This patch destroies the workqueue when registration fails.
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +3 -1
@@ -5868,8 +5868,11 @@ static int __init cxgb4_init_module(void)pr_warn ("could not create debugfs entry, continuing\n" ); ret =pci_register_driver (&cxgb4_driver); -if (ret <0 ) +if (ret <0 ) {debugfs_remove (cxgb4_debugfs_root); +destroy_workqueue (workq); + }return ret; }
Signature · 1 line
1.7.1
David Miller
maintainerFrom: Wei Yang <[email protected]>
Date: Fri, 6 Sep 2013 09:32:25 +0800
Quoted 6 lines
When driver registration fails, we need to clean up the resources allocated before. cxgb4 missed to destroy the workqueue allocated at the very beginning.
This patch destroies the workqueue when registration fails.
Signed-off-by Wei Yang <[email protected]>
This patch was corrupted by your email client, please email the patch to yourself, make sure the patch you receive in the email applies cleanly to the current 'net' tree, and then resubmit.
Thanks.
Quoted 6 lines · David Miller
From: Wei Yang <[email protected]>
Date: Fri, 6 Sep 2013 09:32:25 +0800Quoted 3 lines
When driver registration fails, we need to clean up the resources allocated before. cxgb4 missed to destroy the workqueue allocated at the very beginning.
Quoted 7 lines
Quoted 3 lines
This patch destroies the workqueue when registration fails.
Signed-off-by Wei Yang <[email protected]>This patch was corrupted by your email client, please email the patch to yourself, make sure the patch you receive in the email applies cleanly to the current 'net' tree, and then resubmit.
Sorry for this bothering.
I will re-do it.
Thanks.
Quoted 2 lines
Thanks.
Signature · 2 lines
Richard Yang Help you, Help me