diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2021-03-26 11:54:34 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2021-03-30 09:58:27 +0200 |
commit | f2fb4fe62390b293bc6edc04cc7002940c441359 (patch) | |
tree | 5faba585214f21e3b6866ae6362770339e273700 /drivers/clk/renesas/clk-div6.c | |
parent | clk: renesas: Couple of spelling fixes (diff) | |
download | linux-f2fb4fe62390b293bc6edc04cc7002940c441359.tar.xz linux-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 <geert+renesas@glider.be>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20210326105434.1574796-1-geert+renesas@glider.be
Diffstat (limited to 'drivers/clk/renesas/clk-div6.c')
-rw-r--r-- | drivers/clk/renesas/clk-div6.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/clk/renesas/clk-div6.c b/drivers/clk/renesas/clk-div6.c index 5ca183e70166..8fb68e703a6b 100644 --- a/drivers/clk/renesas/clk-div6.c +++ b/drivers/clk/renesas/clk-div6.c @@ -216,7 +216,7 @@ struct clk * __init cpg_div6_register(const char *name, struct raw_notifier_head *notifiers) { unsigned int valid_parents; - struct clk_init_data init; + struct clk_init_data init = {}; struct div6_clock *clock; struct clk *clk; unsigned int i; @@ -267,7 +267,6 @@ struct clk * __init cpg_div6_register(const char *name, /* Register the clock. */ init.name = name; init.ops = &cpg_div6_clock_ops; - init.flags = 0; init.parent_names = parent_names; init.num_parents = valid_parents; |