From: Uwe Kleine-König Date: Thu, 13 Jan 2011 20:49:05 +0000 (+0100) Subject: net/fec: don't free an irq that failed to be requested X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b2b09ad63cc09448e49f6a4addae6e078c0e5e36;p=linux-beck.git net/fec: don't free an irq that failed to be requested Reported-by: Lothar Waßmann Signed-off-by: Uwe Kleine-König --- 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; }