summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-01-13 23:49:05 +0300
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-02-15 11:26:28 +0300
commitb2b09ad63cc09448e49f6a4addae6e078c0e5e36 (patch)
tree33f2e98d4ebeacbe6ea1a22f5df3cf3fbc057565
parent28e2188efc614c714c69dd5c3f063e066e80d3ba (diff)
downloadlinux-b2b09ad63cc09448e49f6a4addae6e078c0e5e36.tar.xz
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>
-rw-r--r--drivers/net/fec.c3
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)
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;
}