uboot-sunxi: bump u-boot version - update u-boot to 2014.01-rc1 - smp support on a20
[openwrt/openwrt.git] / target / linux / sunxi / patches-3.12 / 100-3-clk-factors-clear-vars.patch
1 From 29aef2f23ca8c91bce0a356fd5f120404389125a Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
3 Date: Thu, 5 Sep 2013 19:50:46 -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 ---
13 drivers/clk/sunxi/clk-factors.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
17 index 5687ac9..f05207a 100644
18 --- a/drivers/clk/sunxi/clk-factors.c
19 +++ b/drivers/clk/sunxi/clk-factors.c
20 @@ -88,7 +88,7 @@ static long clk_factors_round_rate(struct clk_hw *hw, unsigned long rate,
21 static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate,
22 unsigned long parent_rate)
23 {
24 - u8 n, k, m, p;
25 + u8 n = 0, k = 0, m = 0, p = 0;
26 u32 reg;
27 struct clk_factors *factors = to_clk_factors(hw);
28 struct clk_factors_config *config = factors->config;
29 --
30 1.8.5.1
31