Re: [PATCH] drivers: clk: clk-en7523.c: Initialize num before accessing hws in en7523_register_clocks

From: Stephen Boyd
Date: Tue Dec 03 2024 - 17:53:54 EST


Quoting Haoyu Li (2024-12-03 06:29:15)
> With the new __counted_by annocation in clk_hw_onecell_data, the "num"
> struct member must be set before accessing the "hws" array. Failing to
> do so will trigger a runtime warning when enabling CONFIG_UBSAN_BOUNDS
> and CONFIG_FORTIFY_SOURCE.
>
> Fixes: f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with __counted_by")
>
> Signed-off-by: Haoyu Li <lihaoyu499@xxxxxxxxx>
> ---

Applied to clk-fixes