Message ID | 20211223171202.8224-8-s.shtylyov@omp.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix deferred probing in the MMC/SD drivers | expand |
On Thu, Dec 23, 2021 at 08:11:56PM +0300, 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: ff65ffe46d28 ("mmc: Add Actions Semi Owl SoCs SD/MMC driver") > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Thanks, Mani > --- > drivers/mmc/host/owl-mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c > index 3dc143b03939..679b8b0b310e 100644 > --- a/drivers/mmc/host/owl-mmc.c > +++ b/drivers/mmc/host/owl-mmc.c > @@ -638,7 +638,7 @@ static int owl_mmc_probe(struct platform_device *pdev) > > owl_host->irq = platform_get_irq(pdev, 0); > if (owl_host->irq < 0) { > - ret = -EINVAL; > + ret = owl_host->irq; > goto err_release_channel; > } > > -- > 2.26.3 >
diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index 3dc143b03939..679b8b0b310e 100644 --- a/drivers/mmc/host/owl-mmc.c +++ b/drivers/mmc/host/owl-mmc.c @@ -638,7 +638,7 @@ static int owl_mmc_probe(struct platform_device *pdev) owl_host->irq = platform_get_irq(pdev, 0); if (owl_host->irq < 0) { - ret = -EINVAL; + ret = owl_host->irq; goto err_release_channel; }
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: ff65ffe46d28 ("mmc: Add Actions Semi Owl SoCs SD/MMC driver") Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> --- drivers/mmc/host/owl-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)