Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: visconti: Fix uninitialized variable in printk

The "pll_clck" variable is uninitialized. The "ret" error code was
supposed to be printed instead.

Fixes: b4cbe606dc36 ("clk: visconti: Add support common clock driver and reset driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220111072529.GJ11243@kili
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Dan Carpenter and committed by
Stephen Boyd
818d9150 49a8f2bc

+1 -2
+1 -2
drivers/clk/visconti/pll.c
··· 246 246 { 247 247 struct clk_init_data init; 248 248 struct visconti_pll *pll; 249 - struct clk *pll_clk; 250 249 struct clk_hw *pll_hw_clk; 251 250 size_t len; 252 251 int ret; ··· 276 277 pll_hw_clk = &pll->hw; 277 278 ret = clk_hw_register(NULL, &pll->hw); 278 279 if (ret) { 279 - pr_err("failed to register pll clock %s : %ld\n", name, PTR_ERR(pll_clk)); 280 + pr_err("failed to register pll clock %s : %d\n", name, ret); 280 281 kfree(pll); 281 282 pll_hw_clk = ERR_PTR(ret); 282 283 }