Skip to content

Commit 9c981c8

Browse files
passgatbebarino
authored andcommitted
clk: stm32f4: fix an uninitialized variable
The variable s, used by pr_debug() to print the mnemonic of the modulation depth in use, was not initialized. Fix the output by addressing the correct mnemonic. Fixes: 65b3516 ("clk: stm32f4: support spread spectrum clock generation") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/77355eb9-19b3-46e5-a003-c21c0fae5bcd@stanley.mountain Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/r/20250124111711.1051436-1-dario.binacchi@amarulasolutions.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent a250cd4 commit 9c981c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/clk/clk-stm32f4.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,6 @@ static int __init stm32f4_pll_ssc_parse_dt(struct device_node *np,
888888
struct stm32f4_pll_ssc *conf)
889889
{
890890
int ret;
891-
const char *s;
892891

893892
if (!conf)
894893
return -EINVAL;
@@ -916,7 +915,8 @@ static int __init stm32f4_pll_ssc_parse_dt(struct device_node *np,
916915
conf->mod_type = ret;
917916

918917
pr_debug("%pOF: SSCG settings: mod_freq: %d, mod_depth: %d mod_method: %s [%d]\n",
919-
np, conf->mod_freq, conf->mod_depth, s, conf->mod_type);
918+
np, conf->mod_freq, conf->mod_depth,
919+
stm32f4_ssc_mod_methods[ret], conf->mod_type);
920920

921921
return 0;
922922
}

0 commit comments

Comments
 (0)