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.
Unified · Split
| @@ -2435,7 +2435,10 @@ static int smsc911x_drv_probe(struct platform_device *pdev) · 2434 unmodified lines | |||
| 2435 | res_size = resource_size(res); | 2435 | res_size = resource_size(res); |
| 2436 | 2436 | ||
| 2437 | irq = platform_get_irq(pdev, 0); | 2437 | 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) { | ||
| 2439 | pr_warn("Could not allocate irq resource\n"); | 2442 | pr_warn("Could not allocate irq resource\n"); |
| 2440 | retval = -ENODEV; | 2443 | retval = -ENODEV; |
| 2441 | goto out_0; | 2444 | goto out_0; |