[PATCH v2] clk: spacemit: fix resource leak in spacemit_ccu_reset_register

Stephen Boyd sboyd at kernel.org
Thu Jul 24 19:36:44 PDT 2025


Quoting Hendrik Hamerlinck (2025-07-23 06:25:04)
> The function spacemit_ccu_reset_register() allocates memory for an
> auxiliary device. If auxiliary_device_add() fails, it skips cleanup of
> these resources, resulting in leaks.
> 
> Fix this by using the appropriate error handling path.
> 
> Fixes: 988543522ebd ("clk: spacemit: set up reset auxiliary devices")
> Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck at hammernet.be>
> Reviewed-by: Yixun Lan <dlan at gentoo.org>
> ---

Applied to clk-next



More information about the linux-riscv mailing list