Skip to content

Commit 818d915

Browse files
Dan Carpenterbebarino
authored andcommitted
clk: visconti: Fix uninitialized variable in printk
The "pll_clck" variable is uninitialized. The "ret" error code was supposed to be printed instead. Fixes: b4cbe60 ("clk: visconti: Add support common clock driver and reset driver") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/20220111072529.GJ11243@kili Signed-off-by: Stephen Boyd <[email protected]>
1 parent 49a8f2b commit 818d915

File tree

1 file changed

+1
-2
lines changed
  • drivers/clk/visconti

1 file changed

+1
-2
lines changed

drivers/clk/visconti/pll.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx,
246246
{
247247
struct clk_init_data init;
248248
struct visconti_pll *pll;
249-
struct clk *pll_clk;
250249
struct clk_hw *pll_hw_clk;
251250
size_t len;
252251
int ret;
@@ -277,7 +276,7 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx,
277276
pll_hw_clk = &pll->hw;
278277
ret = clk_hw_register(NULL, &pll->hw);
279278
if (ret) {
280-
pr_err("failed to register pll clock %s : %ld\n", name, PTR_ERR(pll_clk));
279+
pr_err("failed to register pll clock %s : %d\n", name, ret);
281280
kfree(pll);
282281
pll_hw_clk = ERR_PTR(ret);
283282
}

0 commit comments

Comments
 (0)