projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c518e84
)
clk: sunxi: factors: clear variables before using them
author
Emilio López
<emilio@elopez.com.ar>
Sat, 21 Sep 2013 01:03:11 +0000
(22:03 -0300)
committer
Maxime Ripard
<maxime.ripard@free-electrons.com>
Sun, 10 Nov 2013 10:39:51 +0000
(11:39 +0100)
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>
drivers/clk/sunxi/clk-factors.c
patch
|
blob
|
history
diff --git
a/drivers/clk/sunxi/clk-factors.c
b/drivers/clk/sunxi/clk-factors.c
index 5687ac9bd85a8ffb087fbd022292a856828ac497..f05207a27e5f8698d9d68a8f9383e11bef5be8d2 100644
(file)
--- 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;