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: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Stefan Wahren 2019-11-11 20:49:21 +01:00 committed by David S. Miller
parent 5b1f0e6294
commit 2b65f93687
1 changed files with 8 additions and 5 deletions

View File

@ -3458,13 +3458,16 @@ 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_optional(pdev, 2);
if (!priv->irq0 || !priv->irq1) {
dev_err(&pdev->dev, "can't find IRQs\n");
err = -EINVAL;
if (priv->irq0 < 0) {
err = priv->irq0;
goto err;
}
priv->irq1 = platform_get_irq(pdev, 1);
if (priv->irq1 < 0) {
err = priv->irq1;
goto err;
}
priv->wol_irq = platform_get_irq_optional(pdev, 2);
if (dn)
macaddr = of_get_mac_address(dn);