mmc: au1xmmc: propagate errors from platform_get_irq()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Thu, 23 Dec 2021 18:45:21 +0000 (21:45 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 28 Dec 2021 16:42:51 +0000 (17:42 +0100)
The driver overrides the error codes returned by platform_get_irq() to
-ENODEV. Switch to propagating the error codes upstream.

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Tested-by: Manuel Lauss <manuel.lauss@gmail.com
Link: https://lore.kernel.org/r/f642ef4d-6027-eb2e-0257-1c4f13911aed@omp.ru
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/au1xmmc.c

index 0acc237..a9a0837 100644 (file)
@@ -969,8 +969,10 @@ static int au1xmmc_probe(struct platform_device *pdev)
        }
 
        host->irq = platform_get_irq(pdev, 0);
-       if (host->irq < 0)
+       if (host->irq < 0) {
+               ret = host->irq;
                goto out3;
+       }
 
        mmc->ops = &au1xmmc_ops;