Re: [PATCH v2] clk: spacemit: fix resource leak in spacemit_ccu_reset_register
From: Stephen Boyd
Date: Thu Jul 24 2025 - 22:36:58 EST
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@xxxxxxxxxxxx>
> Reviewed-by: Yixun Lan <dlan@xxxxxxxxxx>
> ---
Applied to clk-next