Linux MultiMedia Card development
 help / color / mirror / Atom feed
* [PATCH next] mmc: sdhci-of-k1: Fix error code in probe()
@ 2025-05-27  5:55 Dan Carpenter
  2025-05-27  6:58 ` Yixun Lan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-05-27  5:55 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Adrian Hunter, Ulf Hansson, linux-mmc, linux-kernel, linux-riscv,
	spacemit, kernel-janitors

If spacemit_sdhci_get_clocks() fails, then propagate the error code.
Don't return success.

Fixes: e5502d15b0f3 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/mmc/host/sdhci-of-k1.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
index 6880d3e9ab62..2e5da7c5834c 100644
--- a/drivers/mmc/host/sdhci-of-k1.c
+++ b/drivers/mmc/host/sdhci-of-k1.c
@@ -276,7 +276,8 @@ static int spacemit_sdhci_probe(struct platform_device *pdev)
 
 	host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
 
-	if (spacemit_sdhci_get_clocks(dev, pltfm_host))
+	ret = spacemit_sdhci_get_clocks(dev, pltfm_host);
+	if (ret)
 		goto err_pltfm;
 
 	ret = sdhci_add_host(host);
-- 
2.47.2


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

* Re: [PATCH next] mmc: sdhci-of-k1: Fix error code in probe()
  2025-05-27  5:55 [PATCH next] mmc: sdhci-of-k1: Fix error code in probe() Dan Carpenter
@ 2025-05-27  6:58 ` Yixun Lan
  2025-05-28 11:42 ` Adrian Hunter
  2025-06-09 14:25 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: Yixun Lan @ 2025-05-27  6:58 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Adrian Hunter, Ulf Hansson, linux-mmc, linux-kernel, linux-riscv,
	spacemit, kernel-janitors

Hi Dan,

On 08:55 Tue 27 May     , Dan Carpenter wrote:
> If spacemit_sdhci_get_clocks() fails, then propagate the error code.
> Don't return success.
> 
> Fixes: e5502d15b0f3 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/mmc/host/sdhci-of-k1.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
> index 6880d3e9ab62..2e5da7c5834c 100644
> --- a/drivers/mmc/host/sdhci-of-k1.c
> +++ b/drivers/mmc/host/sdhci-of-k1.c
> @@ -276,7 +276,8 @@ static int spacemit_sdhci_probe(struct platform_device *pdev)
>  
>  	host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
>  
> -	if (spacemit_sdhci_get_clocks(dev, pltfm_host))
> +	ret = spacemit_sdhci_get_clocks(dev, pltfm_host);
> +	if (ret)
>  		goto err_pltfm;
>  
>  	ret = sdhci_add_host(host);
> -- 
> 2.47.2
> 
Thanks for catching this..

Reviewed-by: Yixun Lan <dlan@gentoo.org>

-- 
Yixun Lan (dlan)

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

* Re: [PATCH next] mmc: sdhci-of-k1: Fix error code in probe()
  2025-05-27  5:55 [PATCH next] mmc: sdhci-of-k1: Fix error code in probe() Dan Carpenter
  2025-05-27  6:58 ` Yixun Lan
@ 2025-05-28 11:42 ` Adrian Hunter
  2025-06-09 14:25 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2025-05-28 11:42 UTC (permalink / raw)
  To: Dan Carpenter, Yixun Lan
  Cc: Ulf Hansson, linux-mmc, linux-kernel, linux-riscv, spacemit,
	kernel-janitors

On 27/05/2025 08:55, Dan Carpenter wrote:
> If spacemit_sdhci_get_clocks() fails, then propagate the error code.
> Don't return success.
> 
> Fixes: e5502d15b0f3 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-of-k1.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
> index 6880d3e9ab62..2e5da7c5834c 100644
> --- a/drivers/mmc/host/sdhci-of-k1.c
> +++ b/drivers/mmc/host/sdhci-of-k1.c
> @@ -276,7 +276,8 @@ static int spacemit_sdhci_probe(struct platform_device *pdev)
>  
>  	host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
>  
> -	if (spacemit_sdhci_get_clocks(dev, pltfm_host))
> +	ret = spacemit_sdhci_get_clocks(dev, pltfm_host);
> +	if (ret)
>  		goto err_pltfm;
>  
>  	ret = sdhci_add_host(host);


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

* Re: [PATCH next] mmc: sdhci-of-k1: Fix error code in probe()
  2025-05-27  5:55 [PATCH next] mmc: sdhci-of-k1: Fix error code in probe() Dan Carpenter
  2025-05-27  6:58 ` Yixun Lan
  2025-05-28 11:42 ` Adrian Hunter
@ 2025-06-09 14:25 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2025-06-09 14:25 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Yixun Lan, Adrian Hunter, linux-mmc, linux-kernel, linux-riscv,
	spacemit, kernel-janitors

On Tue, 27 May 2025 at 07:55, Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> If spacemit_sdhci_get_clocks() fails, then propagate the error code.
> Don't return success.
>
> Fixes: e5502d15b0f3 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Applied for fixes, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-of-k1.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
> index 6880d3e9ab62..2e5da7c5834c 100644
> --- a/drivers/mmc/host/sdhci-of-k1.c
> +++ b/drivers/mmc/host/sdhci-of-k1.c
> @@ -276,7 +276,8 @@ static int spacemit_sdhci_probe(struct platform_device *pdev)
>
>         host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
>
> -       if (spacemit_sdhci_get_clocks(dev, pltfm_host))
> +       ret = spacemit_sdhci_get_clocks(dev, pltfm_host);
> +       if (ret)
>                 goto err_pltfm;
>
>         ret = sdhci_add_host(host);
> --
> 2.47.2
>

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

end of thread, other threads:[~2025-06-09 14:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27  5:55 [PATCH next] mmc: sdhci-of-k1: Fix error code in probe() Dan Carpenter
2025-05-27  6:58 ` Yixun Lan
2025-05-28 11:42 ` Adrian Hunter
2025-06-09 14:25 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox