aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorStefan Wahren <wahrenst@gmx.net>2019-11-11 20:49:20 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-12 20:07:59 -0800
commit5b1f0e62941b8b307c589c586928a28718e934ef (patch)
tree7f0bb96badae47f11f939f745cae02cb5a81d2dd /drivers/net/ethernet/broadcom
parentnet: dsa: sja1105: Print the reset reason (diff)
downloadlinux-dev-5b1f0e62941b8b307c589c586928a28718e934ef.tar.xz
linux-dev-5b1f0e62941b8b307c589c586928a28718e934ef.zip
net: bcmgenet: Avoid touching non-existent interrupt
As platform_get_irq() now prints an error when the interrupt does not exist, we are getting a confusing error message in case the optional WOL IRQ is not defined: bcmgenet fd58000.ethernet: IRQ index 2 not found Fix this by using the platform_get_irq_optional(). Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmgenet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 3504f77b1a2f..575f162537af 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3459,7 +3459,7 @@ static int bcmgenet_probe(struct platform_device *pdev)
priv = netdev_priv(dev);
priv->irq0 = platform_get_irq(pdev, 0);
priv->irq1 = platform_get_irq(pdev, 1);
- priv->wol_irq = platform_get_irq(pdev, 2);
+ priv->wol_irq = platform_get_irq_optional(pdev, 2);
if (!priv->irq0 || !priv->irq1) {
dev_err(&pdev->dev, "can't find IRQs\n");
err = -EINVAL;