Skip to content

Commit cc819cf

Browse files
Mani-Sadhasivambebarino
authored andcommitted
clk: Zero init clk_init_data in helpers
The clk_init_data struct needs to be initialized to zero for the new parent_map implementation to work correctly. Otherwise, the member which is available first will get processed. Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 54ecb8f commit cc819cf

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

drivers/clk/clk-composite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name,
207207
unsigned long flags)
208208
{
209209
struct clk_hw *hw;
210-
struct clk_init_data init;
210+
struct clk_init_data init = {};
211211
struct clk_composite *composite;
212212
struct clk_ops *clk_composite_ops;
213213
int ret;

drivers/clk/clk-divider.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ static struct clk_hw *_register_divider(struct device *dev, const char *name,
471471
{
472472
struct clk_divider *div;
473473
struct clk_hw *hw;
474-
struct clk_init_data init;
474+
struct clk_init_data init = {};
475475
int ret;
476476

477477
if (clk_divider_flags & CLK_DIVIDER_HIWORD_MASK) {

drivers/clk/clk-fixed-rate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct clk_hw *clk_hw_register_fixed_rate_with_accuracy(struct device *dev,
5858
{
5959
struct clk_fixed_rate *fixed;
6060
struct clk_hw *hw;
61-
struct clk_init_data init;
61+
struct clk_init_data init = {};
6262
int ret;
6363

6464
/* allocate fixed-rate clock */

drivers/clk/clk-gate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ struct clk_hw *clk_hw_register_gate(struct device *dev, const char *name,
141141
{
142142
struct clk_gate *gate;
143143
struct clk_hw *hw;
144-
struct clk_init_data init;
144+
struct clk_init_data init = {};
145145
int ret;
146146

147147
if (clk_gate_flags & CLK_GATE_HIWORD_MASK) {

drivers/clk/clk-mux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ struct clk_hw *clk_hw_register_mux_table(struct device *dev, const char *name,
153153
{
154154
struct clk_mux *mux;
155155
struct clk_hw *hw;
156-
struct clk_init_data init;
156+
struct clk_init_data init = {};
157157
u8 width = 0;
158158
int ret;
159159

0 commit comments

Comments
 (0)