diff options
author | Emilio López <emilio@elopez.com.ar> | 2013-09-20 21:03:11 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-11-10 05:39:51 -0500 |
commit | 12ef06afb3959e7f6f2ae8917c4750883a3e8c14 (patch) | |
tree | 6b919044b0f3c2db4d6d0003b41d9c648c1a6c77 | |
parent | c518e84c76e12e12a2a3404a293b2465af9be5f8 (diff) |
clk: sunxi: factors: clear variables before using them
Random bits may get into our factors if we don't clear n, k, m and p.
Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r-- | drivers/clk/sunxi/clk-factors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c index 5687ac9bd85a..f05207a27e5f 100644 --- a/drivers/clk/sunxi/clk-factors.c +++ b/drivers/clk/sunxi/clk-factors.c | |||
@@ -88,7 +88,7 @@ static long clk_factors_round_rate(struct clk_hw *hw, unsigned long rate, | |||
88 | static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate, | 88 | static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate, |
89 | unsigned long parent_rate) | 89 | unsigned long parent_rate) |
90 | { | 90 | { |
91 | u8 n, k, m, p; | 91 | u8 n = 0, k = 0, m = 0, p = 0; |
92 | u32 reg; | 92 | u32 reg; |
93 | struct clk_factors *factors = to_clk_factors(hw); | 93 | struct clk_factors *factors = to_clk_factors(hw); |
94 | struct clk_factors_config *config = factors->config; | 94 | struct clk_factors_config *config = factors->config; |