Skip to content

Commit f2602fb

Browse files
simontrimmerbroonie
authored andcommitted
ASoC: cs35l56: Avoid static analysis warning of uninitialised variable
Static checkers complain that the silicon_uid variable passed by pointer to cs35l56_read_silicon_uid() could later be used uninitialised when calling cs_amp_get_efi_calibration_data(). cs35l56_read_silicon_uid() must have succeeded to call cs_amp_get_efi_calibration_data() and that would have populated the variable. However, initialise the value so we are not haunted by it forevermore. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Fixes: e1830f6 ("ASoC: cs35l56: Add helper functions for amp calibration") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240422103211.236063-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 32ac501 commit f2602fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/codecs/cs35l56-shared.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ EXPORT_SYMBOL_NS_GPL(cs35l56_calibration_controls, SND_SOC_CS35L56_SHARED);
706706

707707
int cs35l56_get_calibration(struct cs35l56_base *cs35l56_base)
708708
{
709-
u64 silicon_uid;
709+
u64 silicon_uid = 0;
710710
int ret;
711711

712712
/* Driver can't apply calibration to a secured part, so skip */

0 commit comments

Comments
 (0)