linux/drivers/clk/visconti
Brian Masney 1603cbb641
clk: visconti: pll: initialize clk_init_data to zero
Sashiko reported the following:

> The struct clk_init_data init is declared on the stack without being
> fully zero-initialized. While fields like name, flags, parent_names,
> num_parents, and ops are explicitly assigned, the parent_data and
> parent_hws fields are left containing stack garbage.

clk_core_populate_parent_map() currently prefers the parent names over
the parent data and hws, so this isn't a problem at the moment. If that
ordering ever changed in the future, then this could lead to some
unexpected crashes. Let's just go ahead and make sure that the struct
clk_init_data is initialized to zero as a good practice.

Fixes: b4cbe606dc ("clk: visconti: Add support common clock driver and reset driver")
Link: https://sashiko.dev/#/patchset/20260326042317.122536-1-rosenp%40gmail.com
Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Benoît Monin <benoit.monin@bootlin.com>
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-04-11 17:55:27 -07:00
..
clkc-tmpv770x.c clk: visconti: Add VIIF clocks 2025-11-20 18:53:32 -08:00
clkc.c clk: visconti: prevent array overflow in visconti_clk_register_gates() 2022-03-17 12:21:28 -07:00
clkc.h clk: visconti: prevent array overflow in visconti_clk_register_gates() 2022-03-17 12:21:28 -07:00
Kconfig
Makefile
pll-tmpv770x.c clk: visconti: Do not define number of clocks in bindings 2025-11-20 18:53:03 -08:00
pll.c clk: visconti: pll: initialize clk_init_data to zero 2026-04-11 17:55:27 -07:00
pll.h clk: visconti: Fix undefined behavior bug in struct visconti_pll_provider 2023-10-23 19:40:20 -07:00
reset.c
reset.h