diff options
| author | Geert Uytterhoeven <[email protected]> | 2021-03-26 10:54:34 +0000 |
|---|---|---|
| committer | Geert Uytterhoeven <[email protected]> | 2021-03-30 07:58:27 +0000 |
| commit | f2fb4fe62390b293bc6edc04cc7002940c441359 (patch) | |
| tree | 5faba585214f21e3b6866ae6362770339e273700 /drivers/clk/renesas/r9a06g032-clocks.c | |
| parent | clk: renesas: Couple of spelling fixes (diff) | |
| download | kernel-f2fb4fe62390b293bc6edc04cc7002940c441359.tar.gz kernel-f2fb4fe62390b293bc6edc04cc7002940c441359.zip | |
clk: renesas: Zero init clk_init_data
As clk_core_populate_parent_map() checks clk_init_data.num_parents
first, and checks clk_init_data.parent_names[] before
clk_init_data.parent_data[] and clk_init_data.parent_hws[], leaving the
latter uninitialized doesn't do harm for now. However, it is better to
play it safe, and initialize all clk_init_data structures to zeroes, to
avoid any current and future members containing uninitialized data.
Remove a few explicit zero initializers, which are now superfluous.
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Stephen Boyd <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/clk/renesas/r9a06g032-clocks.c')
| -rw-r--r-- | drivers/clk/renesas/r9a06g032-clocks.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c index 1fe166e7f8bd..71b11443f6fc 100644 --- a/drivers/clk/renesas/r9a06g032-clocks.c +++ b/drivers/clk/renesas/r9a06g032-clocks.c @@ -504,7 +504,7 @@ r9a06g032_register_gate(struct r9a06g032_priv *clocks, { struct clk *clk; struct r9a06g032_clk_gate *g; - struct clk_init_data init; + struct clk_init_data init = {}; g = kzalloc(sizeof(*g), GFP_KERNEL); if (!g) @@ -674,7 +674,7 @@ r9a06g032_register_div(struct r9a06g032_priv *clocks, { struct r9a06g032_clk_div *div; struct clk *clk; - struct clk_init_data init; + struct clk_init_data init = {}; unsigned int i; div = kzalloc(sizeof(*div), GFP_KERNEL); @@ -758,7 +758,7 @@ r9a06g032_register_bitsel(struct r9a06g032_priv *clocks, { struct clk *clk; struct r9a06g032_clk_bitsel *g; - struct clk_init_data init; + struct clk_init_data init = {}; const char *names[2]; /* allocate the gate */ @@ -849,7 +849,7 @@ r9a06g032_register_dualgate(struct r9a06g032_priv *clocks, { struct r9a06g032_clk_dualgate *g; struct clk *clk; - struct clk_init_data init; + struct clk_init_data init = {}; /* allocate the gate */ g = kzalloc(sizeof(*g), GFP_KERNEL); |
