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>
This commit is contained in:
Uwe Kleine-König 2011-01-13 21:49:05 +01:00
parent 28e2188efc
commit b2b09ad63c
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}