From 962d359c4d3bd4af0783456b360969edf7c4c745 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 10 Sep 2020 10:40:59 +0200 Subject: [PATCH] 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: Hannes Reinecke Signed-off-by: Martin K. Petersen --- drivers/scsi/lpfc/lpfc_ct.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index ef2015fad2d5..c201686d3815 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c @@ -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; } -- 2.34.1