Skip to content

Commit a561a8e

Browse files
weiyjmartinkpetersen
authored andcommitted
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>
1 parent 22466da commit a561a8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scsi/fcoe/fcoe.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2495,7 +2495,7 @@ static int __init fcoe_init(void)
24952495
if (rc) {
24962496
printk(KERN_ERR "failed to register an fcoe transport, check "
24972497
"if libfcoe is loaded\n");
2498-
return rc;
2498+
goto out_destroy;
24992499
}
25002500

25012501
mutex_lock(&fcoe_config_mutex);
@@ -2518,6 +2518,7 @@ static int __init fcoe_init(void)
25182518

25192519
out_free:
25202520
mutex_unlock(&fcoe_config_mutex);
2521+
out_destroy:
25212522
destroy_workqueue(fcoe_wq);
25222523
return rc;
25232524
}

0 commit comments

Comments
 (0)