summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sunxi
diff options
context:
space:
mode:
authorEmilio López <emilio@elopez.com.ar>2013-09-20 22:03:11 -0300
committerMaxime Ripard <maxime.ripard@free-electrons.com>2013-11-10 11:39:51 +0100
commit12ef06afb3959e7f6f2ae8917c4750883a3e8c14 (patch)
tree6b919044b0f3c2db4d6d0003b41d9c648c1a6c77 /drivers/clk/sunxi
parentc518e84c76e12e12a2a3404a293b2465af9be5f8 (diff)
downloadblackbird-op-linux-12ef06afb3959e7f6f2ae8917c4750883a3e8c14.tar.gz
blackbird-op-linux-12ef06afb3959e7f6f2ae8917c4750883a3e8c14.zip
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>
Diffstat (limited to 'drivers/clk/sunxi')
-rw-r--r--drivers/clk/sunxi/clk-factors.c2
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,
static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
- u8 n, k, m, p;
+ u8 n = 0, k = 0, m = 0, p = 0;
u32 reg;
struct clk_factors *factors = to_clk_factors(hw);
struct clk_factors_config *config = factors->config;
OpenPOWER on IntegriCloud