diff options
author | Hillf Danton <dhillf@gmail.com> | 2011-07-27 15:10:34 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-28 12:10:13 +0400 |
commit | 6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6 (patch) | |
tree | 56211e000600684e2382c995eb59124b909ed774 | |
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>
-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) fc_exch_workqueue = create_singlethread_workqueue("fc_exch_workqueue"); if (!fc_exch_workqueue) - return -ENOMEM; + goto err; return 0; +err: + kmem_cache_destroy(fc_em_cachep); + return -ENOMEM; } /** |