summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-09-10 10:40:59 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2020-10-02 21:38:57 -0400
commit962d359c4d3bd4af0783456b360969edf7c4c745 (patch)
tree3ed341b6cc9942e72a36f406ca51e45ec372780f /drivers/scsi
parent38b2db564d9ab7797192ef15d7aade30633ceeae (diff)
downloadlinux-962d359c4d3bd4af0783456b360969edf7c4c745.tar.bz2
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 <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c2
1 files changed, 2 insertions, 0 deletions
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;
}