All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: visconti: Fix uninitialized variable in printk
@ 2022-01-11  7:25 Dan Carpenter
  2022-01-13 21:21 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-01-11  7:25 UTC (permalink / raw)
  To: Michael Turquette, Nobuhiro Iwamatsu
  Cc: Stephen Boyd, linux-clk, kernel-janitors

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>
---
 drivers/clk/visconti/pll.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/visconti/pll.c b/drivers/clk/visconti/pll.c
index a2398bc6c6e4..a484cb945d67 100644
--- a/drivers/clk/visconti/pll.c
+++ b/drivers/clk/visconti/pll.c
@@ -246,7 +246,6 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx,
 {
 	struct clk_init_data init;
 	struct visconti_pll *pll;
-	struct clk *pll_clk;
 	struct clk_hw *pll_hw_clk;
 	size_t len;
 	int ret;
@@ -277,7 +276,7 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx,
 	pll_hw_clk = &pll->hw;
 	ret = clk_hw_register(NULL, &pll->hw);
 	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);
 		pll_hw_clk = ERR_PTR(ret);
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: visconti: Fix uninitialized variable in printk
  2022-01-11  7:25 [PATCH] clk: visconti: Fix uninitialized variable in printk Dan Carpenter
@ 2022-01-13 21:21 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2022-01-13 21:21 UTC (permalink / raw)
  To: Dan Carpenter, Michael Turquette, Nobuhiro Iwamatsu
  Cc: linux-clk, kernel-janitors

Quoting Dan Carpenter (2022-01-10 23:25:29)
> 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>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-13 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11  7:25 [PATCH] clk: visconti: Fix uninitialized variable in printk Dan Carpenter
2022-01-13 21:21 ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.