Skip to content

Commit c55284e

Browse files
Fabio Estevamdavem330
authored andcommitted
fec: Remove irqs first
During probe the clocks are enabled prior than the acquiring the interrupts. In the remove function we need to do the opposite: first remove the interrupts and then disable the clocks. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f6a4d60 commit c55284e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎drivers/net/ethernet/freescale/fec_main.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,6 +2009,11 @@ fec_drv_remove(struct platform_device *pdev)
20092009
unregister_netdev(ndev);
20102010
fec_enet_mii_remove(fep);
20112011
del_timer_sync(&fep->time_keep);
2012+
for (i = 0; i < FEC_IRQ_NUM; i++) {
2013+
int irq = platform_get_irq(pdev, i);
2014+
if (irq > 0)
2015+
free_irq(irq, ndev);
2016+
}
20122017
if (fep->reg_phy)
20132018
regulator_disable(fep->reg_phy);
20142019
clk_disable_unprepare(fep->clk_ptp);
@@ -2017,11 +2022,6 @@ fec_drv_remove(struct platform_device *pdev)
20172022
clk_disable_unprepare(fep->clk_enet_out);
20182023
clk_disable_unprepare(fep->clk_ahb);
20192024
clk_disable_unprepare(fep->clk_ipg);
2020-
for (i = 0; i < FEC_IRQ_NUM; i++) {
2021-
int irq = platform_get_irq(pdev, i);
2022-
if (irq > 0)
2023-
free_irq(irq, ndev);
2024-
}
20252025
free_netdev(ndev);
20262026

20272027
platform_set_drvdata(pdev, NULL);

0 commit comments

Comments
 (0)