Commit 07bc1978 authored by Haoyu Li's avatar Haoyu Li Committed by Greg Kroah-Hartman
Browse files

clk: en7523: Initialize num before accessing hws in en7523_register_clocks()



[ Upstream commit 52fd1709 ]

With the new __counted_by annotation 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: f316cdff ("clk: Annotate struct clk_hw_onecell_data with __counted_by")
Signed-off-by: default avatarHaoyu Li <lihaoyu499@gmail.com>
Link: https://lore.kernel.org/r/20241203142915.345523-1-lihaoyu499@gmail.com


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 650214c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment