diff options
author | Jayamohan Kallickal <jayamohank@serverengines.com> | 2010-07-21 18:52:27 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:05:31 -0400 |
commit | 1f92638f074f7c6776fb2b565f252573f2b5488c (patch) | |
tree | 4ae5df807024bf2e4dd46c28f0f9fc744e3d4880 /drivers/scsi/be2iscsi/be_iscsi.c | |
parent | f5ed7bd4c6ca5fcec77d3007779d38f63cbb95f4 (diff) |
[SCSI] be2iscsi: Fix for freeing cid
This patch frees up the allocated cid and returns error if allocation
of tag fails.
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_iscsi.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_iscsi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 4f3c2a4079df..de79b7cf804d 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c | |||
@@ -509,6 +509,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, | |||
509 | SE_DEBUG(DBG_LVL_1, | 509 | SE_DEBUG(DBG_LVL_1, |
510 | "mgmt_open_connection Failed for cid=%d\n", | 510 | "mgmt_open_connection Failed for cid=%d\n", |
511 | beiscsi_ep->ep_cid); | 511 | beiscsi_ep->ep_cid); |
512 | beiscsi_put_cid(phba, beiscsi_ep->ep_cid); | ||
513 | return -EAGAIN; | ||
512 | } else { | 514 | } else { |
513 | wait_event_interruptible(phba->ctrl.mcc_wait[tag], | 515 | wait_event_interruptible(phba->ctrl.mcc_wait[tag], |
514 | phba->ctrl.mcc_numtag[tag]); | 516 | phba->ctrl.mcc_numtag[tag]); |