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/rcar-cpg-lib.c | |
parent | dbb397ccc6bbb061da7346d2c5a0d080d5d58a7f (diff) |
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/rcar-cpg-lib.c')
-rw-r--r-- | drivers/clk/renesas/rcar-cpg-lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/renesas/rcar-cpg-lib.c b/drivers/clk/renesas/rcar-cpg-lib.c index 7e7e5d1341d5..5678768ee1f2 100644 --- a/drivers/clk/renesas/rcar-cpg-lib.c +++ b/drivers/clk/renesas/rcar-cpg-lib.c @@ -226,7 +226,7 @@ struct clk * __init cpg_sd_clk_register(const char *name, void __iomem *base, unsigned int offset, const char *parent_name, struct raw_notifier_head *notifiers, bool skip_first) { - struct clk_init_data init; + struct clk_init_data init = {}; struct sd_clock *clock; struct clk *clk; u32 val; |