linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 03/13] mmc: mtk-sd: fix deferred probing
       [not found] <20211223171202.8224-1-s.shtylyov@omp.ru>
@ 2021-12-23 17:11 ` Sergey Shtylyov
  2022-01-04 11:00   ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Shtylyov @ 2021-12-23 17:11 UTC (permalink / raw)
  To: Ulf Hansson, linux-mmc
  Cc: Chaotian Jing, Matthias Brugger, linux-arm-kernel, linux-mediatek

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>
---
 drivers/mmc/host/mtk-sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 632775217d35..4bd070a458e9 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2590,7 +2590,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;
 	}
 
-- 
2.26.3


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RFC 03/13] mmc: mtk-sd: fix deferred probing
  2021-12-23 17:11 ` [PATCH RFC 03/13] mmc: mtk-sd: fix deferred probing Sergey Shtylyov
@ 2022-01-04 11:00   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-01-04 11:00 UTC (permalink / raw)
  To: Sergey Shtylyov, Ulf Hansson, linux-mmc
  Cc: Chaotian Jing, Matthias Brugger, linux-arm-kernel, linux-mediatek

Il 23/12/21 18:11, Sergey Shtylyov ha scritto:
> 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>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> ---
>   drivers/mmc/host/mtk-sd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 632775217d35..4bd070a458e9 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -2590,7 +2590,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;
>   	}
>   
> 


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-04 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211223171202.8224-1-s.shtylyov@omp.ru>
2021-12-23 17:11 ` [PATCH RFC 03/13] mmc: mtk-sd: fix deferred probing Sergey Shtylyov
2022-01-04 11:00   ` AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).