aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorHillf Danton <dhillf@gmail.com>2011-07-27 18:10:34 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-28 04:10:13 -0400
commit6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6 (patch)
tree56211e000600684e2382c995eb59124b909ed774 /drivers/scsi/libfc
parent688fd36427050a87b19f6830c882ee77bb851ecf (diff)
[SCSI] libfc: release exchg cache
If fail to create workqueue, the newly created cache for exchg has to be released. Signed-off-by: Hillf Danton <dhillf@gmail.com> Reviewed-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_exch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index f5a0665b6773..7baf2239ce07 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -2465,8 +2465,11 @@ int fc_setup_exch_mgr(void)
2465 2465
2466 fc_exch_workqueue = create_singlethread_workqueue("fc_exch_workqueue"); 2466 fc_exch_workqueue = create_singlethread_workqueue("fc_exch_workqueue");
2467 if (!fc_exch_workqueue) 2467 if (!fc_exch_workqueue)
2468 return -ENOMEM; 2468 goto err;
2469 return 0; 2469 return 0;
2470err:
2471 kmem_cache_destroy(fc_em_cachep);
2472 return -ENOMEM;
2470} 2473}
2471 2474
2472/** 2475/**