[PATCH v3 3/8] clk: sunxi-ng: fix ccu probe clock unregister on error
Chen-Yu Tsai
wens at kernel.org
Thu Jul 2 06:23:11 PDT 2026
On Thu, Jul 2, 2026 at 4:10 PM Jerome Brunet <jbrunet at baylibre.com> wrote:
>
> When registering clocks with sunxi_ccu_probe(), the number of ccu_clocks
> and the number of hw clocks might be different, eventhough they usually are
> the same.
>
> If they are different, it could lead to out-of-bound access or registered
> clock left behind on error.
>
> Use a different variable when iterating on hw clocks so every registered
> clock, and only those, gets unregistered on error.
>
> Reported-by: Sashiko <sashiko-bot at kernel.org>
> Closes: https://lore.kernel.org/r/20260629131254.7E34C1F00A3A@smtp.kernel.org
> Signed-off-by: Jerome Brunet <jbrunet at baylibre.com>
Reviewed-by: Chen-Yu Tsai <wens at kernel.org>
More information about the linux-arm-kernel
mailing list