提交 73a695f8 编写于 作者: W Wei Yang 提交者: David S. Miller

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: NWei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d6d6d1bc
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册