Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memory: exynos5422-dmc: handle clock enable failures
@ 2026-08-18 13:19 Jiawen Liu
  2026-08-20 10:55 ` Markus Elfring
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jiawen Liu @ 2026-08-18 13:19 UTC (permalink / raw)
  To: Lukasz Luba, Krzysztof Kozlowski, Peter Griffin, linux-pm,
	linux-samsung-soc, linux-kernel, linux-arm-kernel
  Cc: Alim Akhtar

Check clock-enable failures during probe.

If a later clock cannot be enabled, unwind clocks already enabled on
that path before returning the error.

Signed-off-by: jiawen <1298662399@qq.com>
---
diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
--- a/drivers/memory/samsung/exynos5422-dmc.c
+++ b/drivers/memory/samsung/exynos5422-dmc.c
@@ -1297,8 +1297,15 @@
 	if (ret)
 		return ret;
 
-	clk_prepare_enable(dmc->fout_bpll);
-	clk_prepare_enable(dmc->mout_bpll);
+	ret = clk_prepare_enable(dmc->fout_bpll);
+	if (ret)
+		return ret;
+
+	ret = clk_prepare_enable(dmc->mout_bpll);
+	if (ret) {
+		clk_disable_unprepare(dmc->fout_bpll);
+		return ret;
+	}
 
 	/*
 	 * Some bootloaders do not set clock routes correctly.



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

* Re: [PATCH] memory: exynos5422-dmc: handle clock enable failures
  2026-08-18 13:19 [PATCH] memory: exynos5422-dmc: handle clock enable failures Jiawen Liu
@ 2026-08-20 10:55 ` Markus Elfring
  2026-09-01 15:57 ` Krzysztof Kozlowski
  2026-09-04  8:14 ` Lukasz Luba
  2 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2026-08-20 10:55 UTC (permalink / raw)
  To: 1298662399, linux-pm, linux-samsung-soc, linux-arm-kernel,
	Krzysztof Kozlowski, Lukasz Luba, Peter Griffin
  Cc: LKML, kernel-janitors, Alim Akhtar

> Check clock-enable failures during probe.
> 
> If a later clock cannot be enabled, unwind clocks already enabled on
> that path before returning the error.

How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?

See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2#n34
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n145
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n792

Regards,
Markus


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

* Re: [PATCH] memory: exynos5422-dmc: handle clock enable failures
  2026-08-18 13:19 [PATCH] memory: exynos5422-dmc: handle clock enable failures Jiawen Liu
  2026-08-20 10:55 ` Markus Elfring
@ 2026-09-01 15:57 ` Krzysztof Kozlowski
  2026-09-04  8:14 ` Lukasz Luba
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-01 15:57 UTC (permalink / raw)
  To: Jiawen Liu, Lukasz Luba, Peter Griffin, linux-pm,
	linux-samsung-soc, linux-kernel, linux-arm-kernel
  Cc: Alim Akhtar

On 18/08/2026 15:19, Jiawen Liu wrote:
> Check clock-enable failures during probe.
> 
> If a later clock cannot be enabled, unwind clocks already enabled on
> that path before returning the error.
> 
> Signed-off-by: jiawen <1298662399@qq.com>

SoB does not match your "From" name. Please configure git correctly to
use consistent identity.

Best regards,
Krzysztof


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

* Re: [PATCH] memory: exynos5422-dmc: handle clock enable failures
  2026-08-18 13:19 [PATCH] memory: exynos5422-dmc: handle clock enable failures Jiawen Liu
  2026-08-20 10:55 ` Markus Elfring
  2026-09-01 15:57 ` Krzysztof Kozlowski
@ 2026-09-04  8:14 ` Lukasz Luba
  2 siblings, 0 replies; 4+ messages in thread
From: Lukasz Luba @ 2026-09-04  8:14 UTC (permalink / raw)
  To: Jiawen Liu
  Cc: Alim Akhtar, linux-pm, Peter Griffin, Krzysztof Kozlowski,
	linux-arm-kernel, linux-kernel, linux-samsung-soc



On 8/18/26 14:19, Jiawen Liu wrote:
> Check clock-enable failures during probe.
> 
> If a later clock cannot be enabled, unwind clocks already enabled on
> that path before returning the error.
> 
> Signed-off-by: jiawen <1298662399@qq.com>
> ---
> diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
> --- a/drivers/memory/samsung/exynos5422-dmc.c
> +++ b/drivers/memory/samsung/exynos5422-dmc.c
> @@ -1297,8 +1297,15 @@
>   	if (ret)
>   		return ret;
>   
> -	clk_prepare_enable(dmc->fout_bpll);
> -	clk_prepare_enable(dmc->mout_bpll);
> +	ret = clk_prepare_enable(dmc->fout_bpll);
> +	if (ret)
> +		return ret;
> +
> +	ret = clk_prepare_enable(dmc->mout_bpll);
> +	if (ret) {
> +		clk_disable_unprepare(dmc->fout_bpll);
> +		return ret;
> +	}
>   
>   	/*
>   	 * Some bootloaders do not set clock routes correctly.
> 

As other folks mentioned, please align to the procedures for
sending the patches.

The change itself looks good, so looking forward for the proper
v2.

Regards,
Lukasz


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

end of thread, other threads:[~2026-09-04  8:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 13:19 [PATCH] memory: exynos5422-dmc: handle clock enable failures Jiawen Liu
2026-08-20 10:55 ` Markus Elfring
2026-09-01 15:57 ` Krzysztof Kozlowski
2026-09-04  8:14 ` Lukasz Luba

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