summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Shtylyov <s.shtylyov@omp.ru>2023-06-17 23:36:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-28 12:12:30 +0300
commit4806f6b6b7a3bb321b6f5b7b3d748739dc282834 (patch)
tree4ad9febbc0cb820d583f378469f428ef85858baf
parentd28b7a87332f192653984e64a862cdf5a04106b4 (diff)
downloadlinux-4806f6b6b7a3bb321b6f5b7b3d748739dc282834.tar.xz
mmc: mtk-sd: fix deferred probing
[ Upstream commit 0c4dc0f054891a2cbde0426b0c0fdf232d89f47f ] 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: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Link: https://lore.kernel.org/r/20230617203622.6812-4-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/mmc/host/mtk-sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 26bc59b5a7cc..425efb3fba04 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2658,7 +2658,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
host->irq = platform_get_irq(pdev, 0);
if (host->irq < 0) {
- ret = -EINVAL;
+ ret = host->irq;
goto host_free;
}