Skip to content

Commit

Permalink
clk: sunxi: factors: clear variables before using them
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Emilio López authored and Maxime Ripard committed Nov 10, 2013
1 parent c518e84 commit 12ef06a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/sunxi/clk-factors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 12ef06a

Please sign in to comment.