Re: [PATCH] memory: atmel-ebi: release the SMC clock on probe failure

From: Krzysztof Kozlowski

Date: Tue Nov 03 2026 - 05:31:35 EST


On 03/11/2026 10:46, Wentao Liang wrote:
> of_clk_get() returns a consumer reference and clk_prepare_enable()
> enables the SMC clock, but the probe error paths after that point
> return without dropping either. If the regmap lookup, the
> address/size-cells parsing, disabling a child device or
> of_platform_populate() fails, the clock stays enabled and its
> reference is leaked.
>
> Unwind both on these error paths. A successful probe still keeps the
> clock enabled for the lifetime of the controller, as before.
>
> Fixes: 87108dc78eb8 ("memory: atmel-ebi: Enable the SMC clock if specified")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>

I do not take patches from you.

Best regards,
Krzysztof