From: Tony Lindgren Date: Fri, 28 Aug 2015 18:50:15 +0000 (-0700) Subject: net/smsc911x: Fix deferred probe for interrupt X-Git-Tag: firefly_0821_release~176^2~1159^2~33^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f892a84cc890aaaba7bc42daf2e2ee86b0961884;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Tony Lindgren Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 959aeeade0c9..cb9f166f907e 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;