Commit 5a6a25ea authored by Dan Carpenter's avatar Dan Carpenter Committed by Stephen Boyd

clk: sophgo: clk-sg2042-pll: Fix uninitialized variable in debug output

If sg2042_get_pll_ctl_setting() fails then "value" isn't initialized and
it is printed in the debug output.  Initialize it to zero.

Fixes: 48cf7e01 ("clk: sophgo: Add SG2042 clock driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/baf0a490-d5ba-4528-90ba-80399684692d@stanley.mountainReviewed-by: default avatarChen Wang <unicorn_wang@outlook.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent a83b2275
...@@ -387,7 +387,7 @@ static int sg2042_clk_pll_set_rate(struct clk_hw *hw, ...@@ -387,7 +387,7 @@ static int sg2042_clk_pll_set_rate(struct clk_hw *hw,
struct sg2042_pll_clock *pll = to_sg2042_pll_clk(hw); struct sg2042_pll_clock *pll = to_sg2042_pll_clk(hw);
struct sg2042_pll_ctrl pctrl_table; struct sg2042_pll_ctrl pctrl_table;
unsigned long flags; unsigned long flags;
u32 value; u32 value = 0;
int ret; int ret;
spin_lock_irqsave(pll->lock, flags); spin_lock_irqsave(pll->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment