upgrade 3.13 targets to 3.13.2, refresh patches
[openwrt.git] / target / linux / sunxi / patches-3.13 / 102-clk-factors-clear-vars.patch
1 From 789bea92aba0256a7f5309992327df8729333750 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
3 Date: Fri, 20 Sep 2013 22:03:11 -0300
4 Subject: [PATCH] clk: sunxi: factors: clear variables before using them
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Random bits may get into our factors if we don't clear n, k, m and p.
10
11 Signed-off-by: Emilio López <emilio@elopez.com.ar>
12 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
13 ---
14  drivers/clk/sunxi/clk-factors.c | 2 +-
15  1 file changed, 1 insertion(+), 1 deletion(-)
16
17 --- a/drivers/clk/sunxi/clk-factors.c
18 +++ b/drivers/clk/sunxi/clk-factors.c
19 @@ -88,7 +88,7 @@ static long clk_factors_round_rate(struc
20  static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate,
21                                 unsigned long parent_rate)
22  {
23 -       u8 n, k, m, p;
24 +       u8 n = 0, k = 0, m = 0, p = 0;
25         u32 reg;
26         struct clk_factors *factors = to_clk_factors(hw);
27         struct clk_factors_config *config = factors->config;