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

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
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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);