aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Smart <[email protected]>2022-04-27 15:21:58 -0700
committerMartin K. Petersen <[email protected]>2022-05-02 16:59:11 -0400
commit92bd903da12b0c0c5e9e2f560388fe80bb7ce749 (patch)
tree6623abfa5a2032f6cd5c3f764e3cb1c476f3f031
parent1e029397d12f9085840691f4f12991a80d89888c (diff)
scsi: lpfc: Fix additional reference counting in lpfc_bsg_rport_els()
Code inspection has found an additional reference is taken in lpfc_bsg_rport_els(). Results in the ndlp not being freed thus is leaked. Fix by removing the redundant refcount taken before WQE submission. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Nigel Kirkland <[email protected]> Signed-off-by: Nigel Kirkland <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/lpfc/lpfc_bsg.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index ae46383b13bf..676e7d54b97a 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -740,12 +740,6 @@ lpfc_bsg_rport_els(struct bsg_job *job)
readl(phba->HCregaddr); /* flush */
}
- cmdiocbq->ndlp = lpfc_nlp_get(ndlp);
- if (!cmdiocbq->ndlp) {
- rc = -EIO;
- goto linkdown_err;
- }
-
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, cmdiocbq, 0);
if (rc == IOCB_SUCCESS) {
spin_lock_irqsave(&phba->hbalock, flags);