aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorWei Yang <weiyang@linux.vnet.ibm.com>2013-09-15 09:53:00 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-15 22:28:58 -0400
commit73a695f8572e4c46a2aecdbb63f26f36a43e6873 (patch)
tree1a71cbd119674a5c561fb37879df4debadd26079 /drivers/net/ethernet
parentd6d6d1bc44362112e10a48d434e5b3c716152003 (diff)
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. Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 0d0665ca6f19..c73cabdbd4c0 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -6149,8 +6149,10 @@ static int __init cxgb4_init_module(void)
6149 pr_warn("could not create debugfs entry, continuing\n"); 6149 pr_warn("could not create debugfs entry, continuing\n");
6150 6150
6151 ret = pci_register_driver(&cxgb4_driver); 6151 ret = pci_register_driver(&cxgb4_driver);
6152 if (ret < 0) 6152 if (ret < 0) {
6153 debugfs_remove(cxgb4_debugfs_root); 6153 debugfs_remove(cxgb4_debugfs_root);
6154 destroy_workqueue(workq);
6155 }
6154 6156
6155 register_inet6addr_notifier(&cxgb4_inet6addr_notifier); 6157 register_inet6addr_notifier(&cxgb4_inet6addr_notifier);
6156 6158