]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: amd: vangogh: fix uninitialized symbol warning in machine driver
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Fri, 25 Feb 2022 19:30:25 +0000 (01:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:06:41 +0000 (14:06 +0200)
[ Upstream commit 6f989800639a7a29ab9a02e165b04dc144dd4f2b ]

Fixed below smatch static checker warning.
sound/soc/amd/vangogh/acp5x-mach.c:190 acp5x_cs35l41_hw_params()
error: uninitialized symbol 'ret'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/amd/vangogh/acp5x-mach.c

index 14cf325e4b237b9ddae1f7cdfb45986010ee1394..5d7a17755fa7ff0deade34f50529362589899f6e 100644 (file)
@@ -165,6 +165,7 @@ static int acp5x_cs35l41_hw_params(struct snd_pcm_substream *substream,
        unsigned int num_codecs = rtd->num_codecs;
        unsigned int bclk_val;
 
+       ret = 0;
        for (i = 0; i < num_codecs; i++) {
                codec_dai = asoc_rtd_to_codec(rtd, i);
                if ((strcmp(codec_dai->name, "spi-VLV1776:00") == 0) ||