Commit 1ffdd2c0 authored by James Smart's avatar James Smart Committed by Martin K. Petersen

scsi: lpfc: resolve static checker warning in lpfc_sli4_hba_unset

The patch that replaced io channels for hdw_queues now reports the
following static checker warning:

drivers/scsi/lpfc/lpfc_init.c:11136 lpfc_sli4_hba_unset()
 error: we previously assumed 'phba->pport' could be null (see line 11074)

Resolve by adding a pport NULL check.

[mkp: tag tweak]

Fixes: cdb42bec ("scsi: lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu"_
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent cda7fa18
...@@ -11132,6 +11132,7 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba) ...@@ -11132,6 +11132,7 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba)
lpfc_sli4_ras_dma_free(phba); lpfc_sli4_ras_dma_free(phba);
/* Stop the SLI4 device port */ /* Stop the SLI4 device port */
if (phba->pport)
phba->pport->work_port_events = 0; phba->pport->work_port_events = 0;
} }
......
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