[PATCH v2] rtc: amlogic-a4: fix double free caused by devm
Alexandre Belloni
alexandre.belloni at bootlin.com
Fri Oct 31 16:02:19 PDT 2025
On Tue, 21 Oct 2025 18:35:59 +0800, Haotian Zhang wrote:
> The clock obtained via devm_clk_get_enabled() is automatically managed
> by devres and will be disabled and freed on driver detach. Manually
> calling clk_disable_unprepare() in error path and remove function
> causes double free.
>
> Remove the redundant clk_disable_unprepare() calls from the probe
> error path and aml_rtc_remove(), allowing the devm framework to
> automatically manage the clock lifecycle.
>
> [...]
Applied, thanks!
[1/1] rtc: amlogic-a4: fix double free caused by devm
https://git.kernel.org/abelloni/c/384150d7a5b6
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-amlogic
mailing list