提交 a561a8ea 编写于 作者: W Wei Yongjun 提交者: Martin K. Petersen

fcoe: add missing destroy_workqueue() on error in fcoe_init()

Add the missing destroy_workqueue() before return from fcoe_init() in
the fcoe transport register failed error handling case.
Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com>
Acked-by: NJohannes Thumshirn <jth@kernel.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 22466da5
...@@ -2495,7 +2495,7 @@ static int __init fcoe_init(void) ...@@ -2495,7 +2495,7 @@ static int __init fcoe_init(void)
if (rc) { if (rc) {
printk(KERN_ERR "failed to register an fcoe transport, check " printk(KERN_ERR "failed to register an fcoe transport, check "
"if libfcoe is loaded\n"); "if libfcoe is loaded\n");
return rc; goto out_destroy;
} }
mutex_lock(&fcoe_config_mutex); mutex_lock(&fcoe_config_mutex);
...@@ -2518,6 +2518,7 @@ static int __init fcoe_init(void) ...@@ -2518,6 +2518,7 @@ static int __init fcoe_init(void)
out_free: out_free:
mutex_unlock(&fcoe_config_mutex); mutex_unlock(&fcoe_config_mutex);
out_destroy:
destroy_workqueue(fcoe_wq); destroy_workqueue(fcoe_wq);
return rc; return rc;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册