From: Emilio López Date: Sat, 21 Sep 2013 01:03:11 +0000 (-0300) Subject: clk: sunxi: factors: clear variables before using them X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=12ef06afb3959e7f6f2ae8917c4750883a3e8c14;p=linux-beck.git 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 Signed-off-by: Maxime Ripard --- 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;