summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/smsc
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2016-02-07 00:23:20 +0300
committerDavid S. Miller <davem@davemloft.net>2016-02-16 23:02:23 +0300
commitbd59cfc51df7ddc88755a60a1293cee55f5d0a12 (patch)
tree51d77ec9c8acb74f788704062f8c0be4be808cab /drivers/net/ethernet/smsc
parentbfb3a9df6106b5384773734896bf0034f5790243 (diff)
downloadlinux-bd59cfc51df7ddc88755a60a1293cee55f5d0a12.tar.xz
net: smc91x: propagate irq return code
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>
Diffstat (limited to 'drivers/net/ethernet/smsc')
-rw-r--r--drivers/net/ethernet/smsc/smc91x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index 0e2fc1a844ab..db7db8ac4ca3 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -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;
}
/*