mirror of https://gitee.com/openkylin/linux.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 <emilio@elopez.com.ar> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:
parent
c518e84c76
commit
12ef06afb3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue