Commit 2b65f936 authored by Stefan Wahren's avatar Stefan Wahren Committed by David S. Miller

net: bcmgenet: Fix error handling on IRQ retrieval

This fixes the error handling for the mandatory IRQs. There is no need
for the error message anymore, this is now handled by platform_get_irq.
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 5b1f0e62
...@@ -3458,13 +3458,16 @@ static int bcmgenet_probe(struct platform_device *pdev) ...@@ -3458,13 +3458,16 @@ 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);
if (priv->irq0 < 0) {
err = priv->irq0;
goto err;
}
priv->irq1 = platform_get_irq(pdev, 1); priv->irq1 = platform_get_irq(pdev, 1);
priv->wol_irq = platform_get_irq_optional(pdev, 2); if (priv->irq1 < 0) {
if (!priv->irq0 || !priv->irq1) { err = priv->irq1;
dev_err(&pdev->dev, "can't find IRQs\n");
err = -EINVAL;
goto err; goto err;
} }
priv->wol_irq = platform_get_irq_optional(pdev, 2);
if (dn) if (dn)
macaddr = of_get_mac_address(dn); macaddr = of_get_mac_address(dn);
......
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