]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: codecs: nau8325: Silence uninitialized variables warnings
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Wed, 3 Dec 2025 14:06:12 +0000 (15:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:55:23 +0000 (13:55 +0100)
commit6e611d9cf07237828fa47a1c59a169b2105df842
treef27a8b98dbc98312c628314de8e4fbebdd1de2d0
parent5588b7c86effffa9bb55383a38800649d7b40778
ASoC: codecs: nau8325: Silence uninitialized variables warnings

commit 2c7e5e17c05f1d5e10e63e1baff2b362cd08dcd6 upstream.

clang W=1 builds warn:

  nau8325.c:430:13: error: variable 'n2_max' is uninitialized when used here [-Werror,-Wuninitialized]

which are false positive, because the variables will be always
initialized when used (guarded by mclk_max!=0 check).  However
initializing them upfront makes the code more obvious and easier, plus
it silences the warning.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203140611.87191-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/nau8325.c