mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: k3: pll: initialize success flag in ti_pll_wait_for_lock
@ 2026-08-31 14:44 Ahmad Fatoum
  2026-08-31 14:44 ` [PATCH 2/2] ARM: i.MX9: initialize max_speed in imx9_cpu_speed_grade_hz Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-08-31 14:44 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

When built with clang, we run into following warning (turned error with
CONFIG_WERROR):

  drivers/clk/k3/pll.c:100:14: error: variable 'success' is used uninitialized
  whenever 'for' loop exits because its condition is false [-Werror,-Wsometimes-uninitialized]

Initialize the variable to fix.

Fixes: 657d39593b2f ("clk: add K3 clk driver")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/clk/k3/pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/k3/pll.c b/drivers/clk/k3/pll.c
index c76a91b1d094..ef59da3d9dbc 100644
--- a/drivers/clk/k3/pll.c
+++ b/drivers/clk/k3/pll.c
@@ -95,7 +95,7 @@ static int ti_pll_wait_for_lock(struct ti_pll_clk *pll)
 	int i;
 	u32 pllfm;
 	u32 pll_type;
-	int success;
+	int success = 0;
 
 	for (i = 0; i < 100000; i++) {
 		stat = readl(pll->reg + PLL_16FFT_STAT);
-- 
2.47.3




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

end of thread, other threads:[~2026-08-31 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 14:44 [PATCH 1/2] clk: k3: pll: initialize success flag in ti_pll_wait_for_lock Ahmad Fatoum
2026-08-31 14:44 ` [PATCH 2/2] ARM: i.MX9: initialize max_speed in imx9_cpu_speed_grade_hz Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox