diff mbox

[-next] fcoe: add missing destroy_workqueue() on error in fcoe_init()

Message ID 1469807688-32470-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Wei Yongjun July 29, 2016, 3:54 p.m. UTC
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>
---
 drivers/scsi/fcoe/fcoe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


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

Comments

Johannes Thumshirn Aug. 1, 2016, 8:21 a.m. UTC | #1
On Fri, Jul 29, 2016 at 03:54:48PM +0000, Wei Yongjun wrote:
> 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>
Martin K. Petersen Aug. 2, 2016, 5:18 a.m. UTC | #2
>>>>> "Wei" == Wei Yongjun <weiyj.lk@gmail.com> writes:

Wei> Add the missing destroy_workqueue() before return from fcoe_init()
Wei> in the fcoe transport register failed error handling case.

Applied to 4.8/scsi-queue.
diff mbox

Patch

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 197dc62..9bd41a3 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;
 }