]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mmc: sdhci-acpi: fix deferred probing
authorSergey Shtylyov <s.shtylyov@omp.ru>
Sat, 17 Jun 2023 20:36:18 +0000 (23:36 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 19 Jun 2023 11:31:12 +0000 (13:31 +0200)
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>
Link: https://lore.kernel.org/r/20230617203622.6812-9-s.shtylyov@omp.ru
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-acpi.c

index 8f0e639236b15c4cbb725f52196c52a00483b1d6..edf2e6c14dc6f09970d5583f6369faf05a33153c 100644 (file)
@@ -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;
        }