diff options
author | Stefan Wahren <wahrenst@gmx.net> | 2019-11-11 20:49:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-12 20:07:59 -0800 |
commit | 2b65f93687fb2481c4fe5a27aa30a09a46c6389a (patch) | |
tree | 40daea0213157033d8e62d4822fe2efacc7ef55d /drivers | |
parent | net: bcmgenet: Avoid touching non-existent interrupt (diff) | |
download | wireguard-linux-2b65f93687fb2481c4fe5a27aa30a09a46c6389a.tar.xz wireguard-linux-2b65f93687fb2481c4fe5a27aa30a09a46c6389a.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 575f162537af..ee4d8ef66f38 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3458,13 +3458,16 @@ static int bcmgenet_probe(struct platform_device *pdev) priv = netdev_priv(dev); priv->irq0 = platform_get_irq(pdev, 0); + if (priv->irq0 < 0) { + err = priv->irq0; + goto err; + } 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->irq1 < 0) { + err = priv->irq1; goto err; } + priv->wol_irq = platform_get_irq_optional(pdev, 2); if (dn) macaddr = of_get_mac_address(dn); |