1
0
Fork 0

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: cdb42becdd ("scsi: lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu"_
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
hifive-unleashed-5.1
James Smart 2019-03-04 15:27:51 -08:00 committed by Martin K. Petersen
parent cda7fa1865
commit 1ffdd2c044
1 changed files with 2 additions and 1 deletions

View File

@ -11132,7 +11132,8 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba)
lpfc_sli4_ras_dma_free(phba);
/* Stop the SLI4 device port */
phba->pport->work_port_events = 0;
if (phba->pport)
phba->pport->work_port_events = 0;
}
/**