From: Wei Yongjun <[email protected]>

Add the missing destroy_workqueue() before return from
fcoe_init() in the error handling case.

Signed-off-by: Wei Yongjun <[email protected]>
---
 drivers/scsi/fcoe/fcoe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index f317000..0f2e497 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -2623,7 +2623,7 @@ static int __init fcoe_init(void)
        if (rc) {
                printk(KERN_ERR "failed to register an fcoe transport, check "
                        "if libfcoe is loaded\n");
-               return rc;
+               goto out_destroy_wq;
        }
 
        mutex_lock(&fcoe_config_mutex);
@@ -2656,6 +2656,7 @@ out_free:
                fcoe_percpu_thread_destroy(cpu);
        }
        mutex_unlock(&fcoe_config_mutex);
+out_destroy_wq:
        destroy_workqueue(fcoe_wq);
        return rc;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to