Commit 46da547e authored by SeongJae Park's avatar SeongJae Park Committed by Martin K. Petersen

scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()

Commit cdb42bec ("scsi: lpfc: Replace io_channels for nvme and fcp with
general hdw_queues per cpu") has introduced static checker warnings for
potential null dereferences in 'lpfc_sli4_hba_unset()' and commit 1ffdd2c0
("scsi: lpfc: resolve static checker warning in lpfc_sli4_hba_unset") has
tried to fix it.  However, yet another potential null dereference is
remaining.  This commit fixes it.

This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Link: https://lore.kernel.org/r/20200623084122.30633-1-sjpark@amazon.com
Fixes: 1ffdd2c0 ("scsi: lpfc: resolve static checker warning inlpfc_sli4_hba_unset")
Fixes: cdb42bec ("scsi: lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu")
Reviewed-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarSeongJae Park <sjpark@amazon.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent aad4b4d1
......@@ -11878,6 +11878,7 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba)
lpfc_sli4_xri_exchange_busy_wait(phba);
/* per-phba callback de-registration for hotplug event */
if (phba->pport)
lpfc_cpuhp_remove(phba);
/* Disable PCI subsystem interrupt */
......
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