Skip to content

Commit f084290

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Free phba irq in lpfc_sli4_enable_msi() when pci_irq_vector() fails
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>
1 parent 8eccc58 commit f084290

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/scsi/lpfc/lpfc_init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13170,6 +13170,7 @@ lpfc_sli4_enable_msi(struct lpfc_hba *phba)
1317013170
eqhdl = lpfc_get_eq_hdl(0);
1317113171
rc = pci_irq_vector(phba->pcidev, 0);
1317213172
if (rc < 0) {
13173+
free_irq(phba->pcidev->irq, phba);
1317313174
pci_free_irq_vectors(phba->pcidev);
1317413175
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
1317513176
"0496 MSI pci_irq_vec failed (%d)\n", rc);
@@ -13250,6 +13251,7 @@ lpfc_sli4_enable_intr(struct lpfc_hba *phba, uint32_t cfg_mode)
1325013251
eqhdl = lpfc_get_eq_hdl(0);
1325113252
retval = pci_irq_vector(phba->pcidev, 0);
1325213253
if (retval < 0) {
13254+
free_irq(phba->pcidev->irq, phba);
1325313255
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
1325413256
"0502 INTR pci_irq_vec failed (%d)\n",
1325513257
retval);

0 commit comments

Comments
 (0)