Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af4c609c authored by Jayamohan Kallickal's avatar Jayamohan Kallickal Committed by James Bottomley
Browse files

[SCSI] be2iscsi: Remove premature free of cid



Remove unnecessary beiscsi_put_cid that was freeing up the cid while
in use

Signed-off-by: default avatarJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 91446f06
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -523,7 +523,6 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
	if (beiscsi_ep->ep_cid > (phba->fw_config.iscsi_cid_start +
	if (beiscsi_ep->ep_cid > (phba->fw_config.iscsi_cid_start +
				  phba->params.cxns_per_ctrl * 2)) {
				  phba->params.cxns_per_ctrl * 2)) {
		SE_DEBUG(DBG_LVL_1, "Failed in allocate iscsi cid\n");
		SE_DEBUG(DBG_LVL_1, "Failed in allocate iscsi cid\n");
		beiscsi_put_cid(phba, beiscsi_ep->ep_cid);
		goto free_ep;
		goto free_ep;
	}
	}


@@ -560,7 +559,6 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
		SE_DEBUG(DBG_LVL_1, "mgmt_open_connection Failed"
		SE_DEBUG(DBG_LVL_1, "mgmt_open_connection Failed"
				    " status = %d extd_status = %d\n",
				    " status = %d extd_status = %d\n",
				    status, extd_status);
				    status, extd_status);
		beiscsi_put_cid(phba, beiscsi_ep->ep_cid);
		free_mcc_tag(&phba->ctrl, tag);
		free_mcc_tag(&phba->ctrl, tag);
		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
			    nonemb_cmd.va, nonemb_cmd.dma);
			    nonemb_cmd.va, nonemb_cmd.dma);
@@ -575,7 +573,6 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
		beiscsi_ep->cid_vld = 1;
		beiscsi_ep->cid_vld = 1;
		SE_DEBUG(DBG_LVL_8, "mgmt_open_connection Success\n");
		SE_DEBUG(DBG_LVL_8, "mgmt_open_connection Success\n");
	}
	}
	beiscsi_put_cid(phba, beiscsi_ep->ep_cid);
	pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
	pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
			    nonemb_cmd.va, nonemb_cmd.dma);
			    nonemb_cmd.va, nonemb_cmd.dma);
	return 0;
	return 0;