Skip to contentSkip to conversation

be2iscsi: Fix for freeing cid

PATCH In review Jayamohan Kallickal 1 participant 1 message Jul 21, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/19 be2iscsi: Fix for freeing cid

This patch frees up the allocated cid and returns error if allocation
of tag fails.

---
 drivers/scsi/be2iscsi/be_iscsi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/scsi/be2iscsi/be_iscsi.c +2 -0
index 4f3c2a4..de79b7c 100644
@@ -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]);
Signature · 1 line
1.6.5.2