From 12ef06afb3959e7f6f2ae8917c4750883a3e8c14 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Emilio=20L=C3=B3pez?= Date: Fri, 20 Sep 2013 22:03:11 -0300 Subject: [PATCH] clk: sunxi: factors: clear variables before using them MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Random bits may get into our factors if we don't clear n, k, m and p. Signed-off-by: Emilio López Signed-off-by: Maxime Ripard --- drivers/clk/sunxi/clk-factors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2