diff options
author | Hillf Danton <dhillf@gmail.com> | 2011-07-27 18:10:34 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-28 04:10:13 -0400 |
commit | 6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6 (patch) | |
tree | 56211e000600684e2382c995eb59124b909ed774 /drivers/scsi/libfc | |
parent | 688fd36427050a87b19f6830c882ee77bb851ecf (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.c | 5 |
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; |
2470 | err: | ||
2471 | kmem_cache_destroy(fc_em_cachep); | ||
2472 | return -ENOMEM; | ||
2470 | } | 2473 | } |
2471 | 2474 | ||
2472 | /** | 2475 | /** |