diff options
author | Hillf Danton <dhillf@gmail.com> | 2011-07-28 00:10:34 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-28 10:10:13 +0200 |
commit | 6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6 (patch) | |
tree | 56211e000600684e2382c995eb59124b909ed774 /drivers/scsi | |
parent | [SCSI] libfc: use FC_MAX_ERROR_CNT (diff) | |
download | linux-6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6.tar.xz linux-6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6.zip |
[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')
-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; } /** |