Skip to content

Commit dd7078f

Browse files
tititiou36davem330
authored andcommitted
enetc: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions
Call to 'pci_free_irq_vectors()' are missing both in the error handling path of the probe function, and in the remove function. Add them. Fixes: 19971f5 ("enetc: add PTP clock driver") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dd1bf47 commit dd7078f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/freescale/enetc/enetc_ptp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static int enetc_ptp_probe(struct pci_dev *pdev,
8282
n = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX);
8383
if (n != 1) {
8484
err = -EPERM;
85-
goto err_irq;
85+
goto err_irq_vectors;
8686
}
8787

8888
ptp_qoriq->irq = pci_irq_vector(pdev, 0);
@@ -107,6 +107,8 @@ static int enetc_ptp_probe(struct pci_dev *pdev,
107107
err_no_clock:
108108
free_irq(ptp_qoriq->irq, ptp_qoriq);
109109
err_irq:
110+
pci_free_irq_vectors(pdev);
111+
err_irq_vectors:
110112
iounmap(base);
111113
err_ioremap:
112114
kfree(ptp_qoriq);
@@ -125,6 +127,7 @@ static void enetc_ptp_remove(struct pci_dev *pdev)
125127

126128
enetc_phc_index = -1;
127129
ptp_qoriq_free(ptp_qoriq);
130+
pci_free_irq_vectors(pdev);
128131
kfree(ptp_qoriq);
129132

130133
pci_release_mem_regions(pdev);

0 commit comments

Comments
 (0)