mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 23:48:53 +07:00
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:
parent
5b1f0e6294
commit
2b65f93687
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user