Commit c16fa6d5 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

interconnect: icc-clk: Add missed num_nodes initialization



[ Upstream commit c801ed86 ]

With the new __counted_by annotation, the "num_nodes" struct member must
be set before accessing the "nodes" array. This initialization was done
in other places where a new struct icc_onecell_data is allocated, but this
case in icc_clk_register() was missed. Set "num_nodes" after allocation.

Fixes: dd4904f3 ("interconnect: qcom: Annotate struct icc_onecell_data with __counted_by")
Signed-off-by: default avatarKees Cook <kees@kernel.org>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240716214819.work.328-kees@kernel.org


Signed-off-by: default avatarGeorgi Djakov <djakov@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 257c7a39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment