From b2b09ad63cc09448e49f6a4addae6e078c0e5e36 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 13 Jan 2011 21:49:05 +0100 Subject: [PATCH] net/fec: don't free an irq that failed to be requested MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Lothar Waßmann Signed-off-by: Uwe Kleine-König --- drivers/net/fec.c | 3 +-- 1 file changed, 1 insertion(+), 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; } -- 2.20.1