Commit 5b1f0e62 authored by Stefan Wahren's avatar Stefan Wahren Committed by David S. Miller

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: default avatarStefan Wahren <wahrenst@gmx.net>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2eea1fa8
...@@ -3459,7 +3459,7 @@ static int bcmgenet_probe(struct platform_device *pdev) ...@@ -3459,7 +3459,7 @@ static int bcmgenet_probe(struct platform_device *pdev)
priv = netdev_priv(dev); priv = netdev_priv(dev);
priv->irq0 = platform_get_irq(pdev, 0); priv->irq0 = platform_get_irq(pdev, 0);
priv->irq1 = platform_get_irq(pdev, 1); 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) { if (!priv->irq0 || !priv->irq1) {
dev_err(&pdev->dev, "can't find IRQs\n"); dev_err(&pdev->dev, "can't find IRQs\n");
err = -EINVAL; err = -EINVAL;
......
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