History

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.

Tony Lindgren committed 11 years ago

Commit f892a841 parent 73e67421 file · +4 −1Browse files

Unified · Split

drivers/net/ethernet/smsc/smsc911x.c+4−1
@@ -2435,7 +2435,10 @@ static int smsc911x_drv_probe(struct platform_device *pdev) · 2434 unmodified lines
24352435 res_size = resource_size(res);
24362436
24372437 irq = platform_get_irq(pdev, 0);
2438− if (irq <= 0) {
2438+ if (irq == -EPROBE_DEFER) {
2439+ retval = -EPROBE_DEFER;
2440+ goto out_0;
2441+ } else if (irq <= 0) {
24392442 pr_warn("Could not allocate irq resource\n");
24402443 retval = -ENODEV;
24412444 goto out_0;