mirror of https://gitee.com/openkylin/linux.git
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:
parent
28e2188efc
commit
b2b09ad63c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue