From: Jayamohan Kallickal Date: Wed, 21 Jul 2010 22:52:27 +0000 (+0530) Subject: [SCSI] be2iscsi: Fix for freeing cid X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1f92638f074f7c6776fb2b565f252573f2b5488c;p=linux-beck.git [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 Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- 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, 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]);