scsi: lpfc: Free phba irq in lpfc_sli4_enable_msi() when pci_irq_vector() fails
[ Upstream commit f0842902b383982d1f72c490996aa8fc29a7aa0d ]
Fix smatch warning regarding missed calls to free_irq(). Free the phba IRQ
in the failed pci_irq_vector cases.
lpfc_init.c: lpfc_sli4_enable_msi() warn: 'phba->pcidev->irq' from
request_irq() not released.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20250131000524.163662-3-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
609bc6e9c1
commit
1be28b37a6
@@ -13190,6 +13190,7 @@ lpfc_sli4_enable_msi(struct lpfc_hba *phba)
|
||||
eqhdl = lpfc_get_eq_hdl(0);
|
||||
rc = pci_irq_vector(phba->pcidev, 0);
|
||||
if (rc < 0) {
|
||||
free_irq(phba->pcidev->irq, phba);
|
||||
pci_free_irq_vectors(phba->pcidev);
|
||||
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
|
||||
"0496 MSI pci_irq_vec failed (%d)\n", rc);
|
||||
@@ -13270,6 +13271,7 @@ lpfc_sli4_enable_intr(struct lpfc_hba *phba, uint32_t cfg_mode)
|
||||
eqhdl = lpfc_get_eq_hdl(0);
|
||||
retval = pci_irq_vector(phba->pcidev, 0);
|
||||
if (retval < 0) {
|
||||
free_irq(phba->pcidev->irq, phba);
|
||||
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
|
||||
"0502 INTR pci_irq_vec failed (%d)\n",
|
||||
retval);
|
||||
|
||||
Reference in New Issue
Block a user