Commit 962d359c authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen
Browse files

scsi: lpfc: Drop nodelist reference on error in lpfc_gen_req()

If we fail to issue the iocb in lpfc_gen_req() we need to drop the nodelist
reference.

Link: https://lore.kernel.org/r/20200910084059.138507-1-hare@suse.de


Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 38b2db56
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -387,6 +387,8 @@ lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp,
	rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, geniocb, 0);

	if (rc == IOCB_ERROR) {
		geniocb->context_un.ndlp = NULL;
		lpfc_nlp_put(ndlp);
		lpfc_sli_release_iocbq(phba, geniocb);
		return 1;
	}