summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sophgo
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-07-18 04:25:53 +0200
committerStephen Boyd <sboyd@kernel.org>2024-07-18 22:33:15 +0200
commit5a6a25ea5bcd5bdf80fb13acd65a03fc6b8794b1 (patch)
treec1521c86577a05b336bf4f2f1d2375e792d5753b /drivers/clk/sophgo
parentclk: davinci: da8xx-cfgchip: Initialize clk_init_data before use (diff)
downloadlinux-5a6a25ea5bcd5bdf80fb13acd65a03fc6b8794b1.tar.xz
linux-5a6a25ea5bcd5bdf80fb13acd65a03fc6b8794b1.zip
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: 48cf7e01386e ("clk: sophgo: Add SG2042 clock driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/baf0a490-d5ba-4528-90ba-80399684692d@stanley.mountain Reviewed-by: Chen Wang <unicorn_wang@outlook.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/sophgo')
-rw-r--r--drivers/clk/sophgo/clk-sg2042-pll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sophgo/clk-sg2042-pll.c b/drivers/clk/sophgo/clk-sg2042-pll.c
index 9695e64fc23b..ff9deeef509b 100644
--- a/drivers/clk/sophgo/clk-sg2042-pll.c
+++ b/drivers/clk/sophgo/clk-sg2042-pll.c
@@ -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_ctrl pctrl_table;
unsigned long flags;
- u32 value;
+ u32 value = 0;
int ret;
spin_lock_irqsave(pll->lock, flags);