Skip to content

Commit

Permalink
[SCSI] libfc: release exchg cache
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hillf Danton authored and James Bottomley committed Jul 28, 2011
1 parent 688fd36 commit 6f06e3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/scsi/libfc/fc_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 6f06e3a

Please sign in to comment.