summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hbadisc.c
diff options
context:
space:
mode:
authorJustin Tee <justin.tee@broadcom.com>2023-10-31 20:12:19 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2023-11-15 15:52:57 +0100
commite07ac2d2aa5fce0cefe7273f6b9babec1e9a1503 (patch)
tree1373bebecd68dd164ebdc8e4e887cecc019c2a9e /drivers/scsi/lpfc/lpfc_hbadisc.c
parentscsi: lpfc: Fix list_entry null check warning in lpfc_cmpl_els_plogi() (diff)
downloadlinux-e07ac2d2aa5fce0cefe7273f6b9babec1e9a1503.tar.xz
linux-e07ac2d2aa5fce0cefe7273f6b9babec1e9a1503.zip
scsi: lpfc: Eliminate unnecessary relocking in lpfc_check_nlp_post_devloss()
In lpfc_check_nlp_post_devloss(), retaking of the ndlp lock in the if statement is useless because the very next line unlocks. Simply return to avoid relocking. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20231031191224.150862-5-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 7ef9841f0728..f80bbc315f4c 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -411,7 +411,7 @@ lpfc_check_nlp_post_devloss(struct lpfc_vport *vport,
"port_state = x%x\n",
ndlp->nlp_DID, kref_read(&ndlp->kref), ndlp,
ndlp->nlp_flag, vport->port_state);
- spin_lock_irqsave(&ndlp->lock, iflags);
+ return;
}
spin_unlock_irqrestore(&ndlp->lock, iflags);
}