summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-05-27 03:48:30 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-05-28 05:29:54 (GMT)
commit7a2bbd8d8e36c4fae7610bb1be96c2ba5ff7553a (patch)
tree42d2b572c87534023eeb21cd9c66fe7d8d34504c /drivers/net/ethernet
parentf4e9f3d2fdb141d920c9fd7bd5ea7db348f6d3be (diff)
downloadlinux-7a2bbd8d8e36c4fae7610bb1be96c2ba5ff7553a.tar.xz
fec: Invert the order of error path sequence
Currently when fec_enet_init fails it jumps to 'failed_init' error path, which will attemp to free the interrupts. This is wrong because at this point the interrupts have not even been acquired. Swap failed_init/failed_irq to fix the error path. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 57ac7c3..dc7388e 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1975,13 +1975,13 @@ fec_probe(struct platform_device *pdev)
failed_register:
fec_enet_mii_remove(fep);
failed_mii_init:
-failed_init:
+failed_irq:
for (i = 0; i < FEC_IRQ_NUM; i++) {
irq = platform_get_irq(pdev, i);
if (irq > 0)
free_irq(irq, ndev);
}
-failed_irq:
+failed_init:
failed_regulator:
clk_disable_unprepare(fep->clk_ahb);
clk_disable_unprepare(fep->clk_ipg);