Message ID | 20230608194519.10665-9-s.shtylyov@omp.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix deferred probing in the MMC/SD drivers | expand |
On 8/06/23 22:45, Sergey Shtylyov wrote: > The driver overrides the error codes returned by platform_get_irq() to > -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe > permanently instead of the deferred probing. Switch to propagating the > error codes upstream. > > Fixes: 1b7ba57ecc86 ("mmc: sdhci-acpi: Handle return value of platform_get_irq") > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Acked-by: Adrian Hunter <adrian.hunter@intel.com> > --- > Changes in version 2: > - refreshed the patch. > > drivers/mmc/host/sdhci-acpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c > index 8f0e639236b1..edf2e6c14dc6 100644 > --- a/drivers/mmc/host/sdhci-acpi.c > +++ b/drivers/mmc/host/sdhci-acpi.c > @@ -829,7 +829,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) > host->ops = &sdhci_acpi_ops_dflt; > host->irq = platform_get_irq(pdev, 0); > if (host->irq < 0) { > - err = -EINVAL; > + err = host->irq; > goto err_free; > } >
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 8f0e639236b1..edf2e6c14dc6 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -829,7 +829,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) host->ops = &sdhci_acpi_ops_dflt; host->irq = platform_get_irq(pdev, 0); if (host->irq < 0) { - err = -EINVAL; + err = host->irq; goto err_free; }
The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 1b7ba57ecc86 ("mmc: sdhci-acpi: Handle return value of platform_get_irq") Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> --- Changes in version 2: - refreshed the patch. drivers/mmc/host/sdhci-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)