Commit 86f9f2c8 authored by Lothar Waßmann's avatar Lothar Waßmann Committed by David S. Miller

net/fec: don't request invalid IRQ

prevent calling request_irq() with a known invalid IRQ number and
preserve the return value of the platform_get_irq() function
Signed-off-by: default avatarLothar Waßmann <>
Acked-by: default avatarShawn Guo <>
Signed-off-by: default avatarDavid S. Miller <>
parent 6ea0722f
......@@ -1575,8 +1575,12 @@ fec_probe(struct platform_device *pdev)
for (i = 0; i < FEC_IRQ_NUM; i++) {
irq = platform_get_irq(pdev, i);
if (i && irq < 0)
if (irq < 0) {
if (i)
ret = irq;
goto failed_irq;
ret = request_irq(irq, fec_enet_interrupt, IRQF_DISABLED, pdev->name, ndev);
if (ret) {
while (--i >= 0) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment