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

Commit 3ebd9b47 authored by James Smart's avatar James Smart Committed by Martin K. Petersen
Browse files

scsi: lpfc: Fix nvme allocation bug on failed nvme_fc_register_localport



nvme bufs get allocated even when the registration fails.
Move allocation into the rsgistration success path.

Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a5068b46
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2164,10 +2164,10 @@ lpfc_nvme_create_localport(struct lpfc_vport *vport)
		lport->vport = vport;
		INIT_LIST_HEAD(&lport->rport_list);
		vport->nvmei_support = 1;
	}

		len  = lpfc_new_nvme_buf(vport, phba->sli4_hba.nvme_xri_max);
		vport->phba->total_nvme_bufs += len;
	}

	return ret;
}