diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-29 17:54:48 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-08-02 07:18:05 +0200 |
commit | a561a8ea837182e2ac2c699e64a33b76f29d1668 (patch) | |
tree | 95bcac254aa0330ff2bc609d29d546e65d549ebb /drivers/scsi/fcoe | |
parent | lpfc: Fix possible NULL pointer dereference (diff) | |
download | linux-a561a8ea837182e2ac2c699e64a33b76f29d1668.tar.xz linux-a561a8ea837182e2ac2c699e64a33b76f29d1668.zip |
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: Wei Yongjun <weiyj.lk@gmail.com>
Acked-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 197dc62ea67a..9bd41a35a78a 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -2495,7 +2495,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; } mutex_lock(&fcoe_config_mutex); @@ -2518,6 +2518,7 @@ static int __init fcoe_init(void) out_free: mutex_unlock(&fcoe_config_mutex); +out_destroy: destroy_workqueue(fcoe_wq); return rc; } |