Skip to content

Commit

Permalink
[SCSI] be2iscsi: Fix for freeing cid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jayamohan Kallickal authored and James Bottomley committed Jul 28, 2010
1 parent f5ed7bd commit 1f92638
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/be2iscsi/be_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
SE_DEBUG(DBG_LVL_1,
"mgmt_open_connection Failed for cid=%d\n",
beiscsi_ep->ep_cid);
beiscsi_put_cid(phba, beiscsi_ep->ep_cid);
return -EAGAIN;
} else {
wait_event_interruptible(phba->ctrl.mcc_wait[tag],
phba->ctrl.mcc_numtag[tag]);
Expand Down

0 comments on commit 1f92638

Please sign in to comment.