diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-01-13 21:49:05 +0100 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-02-15 09:26:28 +0100 |
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 b079826586e..aa1db8e637c 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -1409,10 +1409,9 @@ fec_probe(struct platform_device *pdev) break; ret = request_irq(irq, fec_enet_interrupt, IRQF_DISABLED, pdev->name, ndev); if (ret) { - while (i >= 0) { + while (--i >= 0) { irq = platform_get_irq(pdev, i); free_irq(irq, ndev); - i--; } goto failed_irq; } |