Commit f892a84c authored by Tony Lindgren's avatar Tony Lindgren Committed by David S. Miller

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: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73e67420
...@@ -2435,7 +2435,10 @@ static int smsc911x_drv_probe(struct platform_device *pdev) ...@@ -2435,7 +2435,10 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
res_size = resource_size(res); res_size = resource_size(res);
irq = platform_get_irq(pdev, 0); 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"); pr_warn("Could not allocate irq resource\n");
retval = -ENODEV; retval = -ENODEV;
goto out_0; goto out_0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment