Commit 3d1d34ec authored by James Smart's avatar James Smart Committed by Martin K. Petersen

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: d51cf5bd ("scsi: lpfc: Fix field overload in lpfc_iocbq data structure")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 75b8715e
...@@ -22283,7 +22283,7 @@ lpfc_sli_prep_wqe(struct lpfc_hba *phba, struct lpfc_iocbq *job) ...@@ -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_ct, &wqe->els_req.wqe_com, 1);
bf_set(wqe_ctxt_tag, &wqe->els_req.wqe_com, bf_set(wqe_ctxt_tag, &wqe->els_req.wqe_com,
phba->vpi_ids[job->vport->vpi]); 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_ct, &wqe->els_req.wqe_com, 0);
bf_set(wqe_ctxt_tag, &wqe->els_req.wqe_com, bf_set(wqe_ctxt_tag, &wqe->els_req.wqe_com,
phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment