Skip to content

Commit e1f550d

Browse files
cpackham-atlnzdavem330
authored andcommitted
net: mvmdio: avoid error message for optional IRQ
Per the dt-binding the interrupt is optional so use platform_get_irq_optional() instead of platform_get_irq(). Since commit 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()") platform_get_irq() produces an error message orion-mdio f1072004.mdio: IRQ index 0 not found which is perfectly normal if one hasn't specified the optional property in the device tree. Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 012fc74 commit e1f550d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/marvell/mvmdio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
347347
}
348348

349349

350-
dev->err_interrupt = platform_get_irq(pdev, 0);
350+
dev->err_interrupt = platform_get_irq_optional(pdev, 0);
351351
if (dev->err_interrupt > 0 &&
352352
resource_size(r) < MVMDIO_ERR_INT_MASK + 4) {
353353
dev_err(&pdev->dev,
@@ -364,8 +364,8 @@ static int orion_mdio_probe(struct platform_device *pdev)
364364
writel(MVMDIO_ERR_INT_SMI_DONE,
365365
dev->regs + MVMDIO_ERR_INT_MASK);
366366

367-
} else if (dev->err_interrupt == -EPROBE_DEFER) {
368-
ret = -EPROBE_DEFER;
367+
} else if (dev->err_interrupt < 0) {
368+
ret = dev->err_interrupt;
369369
goto out_mdio;
370370
}
371371

0 commit comments

Comments
 (0)