2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-13 15:53:56 +08:00

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>
This commit is contained in:
Wei Yang 2013-09-15 21:53:00 +08:00 committed by David S. Miller
parent d6d6d1bc44
commit 73a695f857

View File

@ -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);