sh_eth: propagate platform_get_irq() error upstream
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Fri, 28 Aug 2015 13:56:01 +0000 (16:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Aug 2015 05:25:43 +0000 (22:25 -0700)
The driver overrides the error returned by platform_get_irq() with -ENODEV
which e.g. precludes the deferred  probing from working. Propagate the real
error code to the driver core instead.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c

index 7fb244f565b283b0c130caa7476a8e4339564283..257ea713b4c1564fa680acfcf7ad760268ea0df6 100644 (file)
@@ -3089,10 +3089,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
 
        ndev->dma = -1;
        ret = platform_get_irq(pdev, 0);
-       if (ret < 0) {
-               ret = -ENODEV;
+       if (ret < 0)
                goto out_release;
-       }
        ndev->irq = ret;
 
        SET_NETDEV_DEV(ndev, &pdev->dev);