]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
net: smc91x: propagate irq return code
authorRobert Jarzmik <robert.jarzmik@free.fr>
Sat, 6 Feb 2016 21:23:20 +0000 (22:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2016 20:02:23 +0000 (15:02 -0500)
The smc91x driver doesn't honor the probe deferral mechanism when the
interrupt source is not yet available, such as one provided by a gpio
controller not probed.

Fix this by propagating the platform_get_irq() error code as the probe
return value.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smc91x.c

index 0e2fc1a844ab2b2453681750368e1cf9d288e779..db7db8ac4ca308a2f5f52e11f052bbd246c824a4 100644 (file)
@@ -2342,8 +2342,8 @@ static int smc_drv_probe(struct platform_device *pdev)
        }
 
        ndev->irq = platform_get_irq(pdev, 0);
-       if (ndev->irq <= 0) {
-               ret = -ENODEV;
+       if (ndev->irq < 0) {
+               ret = ndev->irq;
                goto out_release_io;
        }
        /*