diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-01-13 15:49:05 -0500 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-02-15 03:26:28 -0500 |
commit | b2b09ad63cc09448e49f6a4addae6e078c0e5e36 (patch) | |
tree | 33f2e98d4ebeacbe6ea1a22f5df3cf3fbc057565 /drivers/net/fec.c | |
parent | 28e2188efc614c714c69dd5c3f063e066e80d3ba (diff) |
net/fec: don't free an irq that failed to be requested
Reported-by: Lothar Waßmann <LW@KARO-elektronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/net/fec.c')
-rw-r--r-- | drivers/net/fec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index b079826586ef..aa1db8e637cd 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -1409,10 +1409,9 @@ fec_probe(struct platform_device *pdev) | |||
1409 | break; | 1409 | break; |
1410 | ret = request_irq(irq, fec_enet_interrupt, IRQF_DISABLED, pdev->name, ndev); | 1410 | ret = request_irq(irq, fec_enet_interrupt, IRQF_DISABLED, pdev->name, ndev); |
1411 | if (ret) { | 1411 | if (ret) { |
1412 | while (i >= 0) { | 1412 | while (--i >= 0) { |
1413 | irq = platform_get_irq(pdev, i); | 1413 | irq = platform_get_irq(pdev, i); |
1414 | free_irq(irq, ndev); | 1414 | free_irq(irq, ndev); |
1415 | i--; | ||
1416 | } | 1415 | } |
1417 | goto failed_irq; | 1416 | goto failed_irq; |
1418 | } | 1417 | } |