Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a561a8ea authored by Wei Yongjun's avatar Wei Yongjun Committed by Martin K. Petersen
Browse files

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: default avatarWei Yongjun <weiyj.lk@gmail.com>
Acked-by: default avatarJohannes Thumshirn <jth@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 22466da5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
}