summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2022-04-26 20:13:15 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2022-04-27 04:24:27 +0200
commit3d1d34ec1fbcab2d77e3733ff385a074fdf2d60c (patch)
tree8d8560e966902b2fdab450249235d9cb20a82389 /drivers/scsi
parentscsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() (diff)
downloadlinux-3d1d34ec1fbcab2d77e3733ff385a074fdf2d60c.tar.xz
linux-3d1d34ec1fbcab2d77e3733ff385a074fdf2d60c.zip
scsi: lpfc: Remove unnecessary null ndlp check in lpfc_sli_prep_wqe()
Smatch had the following warning: drivers/scsi/lpfc/lpfc_sli.c:22305 lpfc_sli_prep_wqe() error: we previously assumed 'ndlp' could be null (see line 22298) Remove the unnecessary null check. Link: https://lore.kernel.org/r/20220426181315.8990-1-jsmart2021@gmail.com Fixes: d51cf5bd926c ("scsi: lpfc: Fix field overload in lpfc_iocbq data structure") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 1b613f630ed5..b02c9ae39cde 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -22283,7 +22283,7 @@ lpfc_sli_prep_wqe(struct lpfc_hba *phba, struct lpfc_iocbq *job)
bf_set(wqe_ct, &wqe->els_req.wqe_com, 1);
bf_set(wqe_ctxt_tag, &wqe->els_req.wqe_com,
phba->vpi_ids[job->vport->vpi]);
- } else if (pcmd && ndlp) {
+ } else if (pcmd) {
bf_set(wqe_ct, &wqe->els_req.wqe_com, 0);
bf_set(wqe_ctxt_tag, &wqe->els_req.wqe_com,
phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]);