Commit 818d9150 authored by Dan Carpenter's avatar Dan Carpenter Committed by Stephen Boyd

clk: visconti: Fix uninitialized variable in printk

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

Fixes: b4cbe606 ("clk: visconti: Add support common clock driver and reset driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220111072529.GJ11243@kiliSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 49a8f2bc
...@@ -246,7 +246,6 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx, ...@@ -246,7 +246,6 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx,
{ {
struct clk_init_data init; struct clk_init_data init;
struct visconti_pll *pll; struct visconti_pll *pll;
struct clk *pll_clk;
struct clk_hw *pll_hw_clk; struct clk_hw *pll_hw_clk;
size_t len; size_t len;
int ret; int ret;
...@@ -277,7 +276,7 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx, ...@@ -277,7 +276,7 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx,
pll_hw_clk = &pll->hw; pll_hw_clk = &pll->hw;
ret = clk_hw_register(NULL, &pll->hw); ret = clk_hw_register(NULL, &pll->hw);
if (ret) { if (ret) {
pr_err("failed to register pll clock %s : %ld\n", name, PTR_ERR(pll_clk)); pr_err("failed to register pll clock %s : %d\n", name, ret);
kfree(pll); kfree(pll);
pll_hw_clk = ERR_PTR(ret); pll_hw_clk = ERR_PTR(ret);
} }
......
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