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

Krzysztof Kozlowski krzk at kernel.org
Tue Nov 3 02:20:38 PST 2026


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 at vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>

I do not take patches from you.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list