diff options
author | Tony Lindgren <tony@atomide.com> | 2015-08-28 18:50:15 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-29 20:09:17 (GMT) |
commit | f892a84cc890aaaba7bc42daf2e2ee86b0961884 (patch) | |
tree | 7e0bb8dbaa0516fe2e6c9cd8273a84bd28f5edae /drivers/net/ethernet/smsc | |
parent | 73e6742027f5cb5a7c747d9abab5351b01fd4c74 (diff) | |
download | linux-f892a84cc890aaaba7bc42daf2e2ee86b0961884.tar.xz |
net/smsc911x: Fix deferred probe for interrupt
The interrupt handler may not be available when smsc911x probes if the
interrupt handler is a GPIO controller for example. Let's fix that
by adding handling for -EPROBE_DEFER.
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/smsc')
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 959aeea..cb9f166f 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c @@ -2435,7 +2435,10 @@ static int smsc911x_drv_probe(struct platform_device *pdev) res_size = resource_size(res); irq = platform_get_irq(pdev, 0); - if (irq <= 0) { + if (irq == -EPROBE_DEFER) { + retval = -EPROBE_DEFER; + goto out_0; + } else if (irq <= 0) { pr_warn("Could not allocate irq resource\n"); retval = -ENODEV; goto out_0; |