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 | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +3 -1
@@ -6149,8 +6149,10 @@ 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); + }register_inet6addr_notifier (&cxgb4_inet6addr_notifier);
Signature · 1 line
1.7.1
This time, I cc-ed to myself. And this applies to the latest net tree.
It looks not corrupted to me. Not sure other people can see it clearly?
Quoted 33 lines · Wei Yang
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]>---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c| 4 +++-1 files changed, 3 insertions(+), 1 deletions(-)drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +3
-1@@ -6149,8 +6149,10 @@ 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); + }register_inet6addr_notifier (&cxgb4_inet6addr_notifier);Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Richard Yang Help you, Help me
From: Wei Yang <[email protected]>
Date: Sun, 15 Sep 2013 21:53:00 +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]>
Applied.
Quoted 11 lines · David Miller
From: Wei Yang <[email protected]>
Date: Sun, 15 Sep 2013 21:53:00 +0800Quoted 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]>Applied.
Thanks~
Signature · 2 lines
Richard Yang Help you, Help me