Skip to content

Commit 5a6a25e

Browse files
Dan Carpenterbebarino
authored andcommitted
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: 48cf7e0 ("clk: sophgo: Add SG2042 clock driver") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chen Wang <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent a83b227 commit 5a6a25e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/sophgo/clk-sg2042-pll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static int sg2042_clk_pll_set_rate(struct clk_hw *hw,
387387
struct sg2042_pll_clock *pll = to_sg2042_pll_clk(hw);
388388
struct sg2042_pll_ctrl pctrl_table;
389389
unsigned long flags;
390-
u32 value;
390+
u32 value = 0;
391391
int ret;
392392

393393
spin_lock_irqsave(pll->lock, flags);

0 commit comments

Comments
 (0)