]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: mediatek: mt8195: silence uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 8 Dec 2021 15:11:45 +0000 (18:11 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 8 Dec 2021 15:31:29 +0000 (15:31 +0000)
Smatch complains that we might hit the continue path on every iteration
through the loop.

    sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c:831
      mt8195_mt6359_rt1019_rt5682_card_late_probe()
    error: uninitialized symbol 'sof_comp'.

Initialize "sof_comp" to NULL to silence this warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211208151145.GA29257@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c

index b240610dcef09562fe45847277224af10191aa3a..11a185da0d96493f06ef88e778ece0c5b2af1867 100644 (file)
@@ -813,7 +813,7 @@ static int mt8195_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
 static int mt8195_mt6359_rt1019_rt5682_card_late_probe(struct snd_soc_card *card)
 {
        struct snd_soc_pcm_runtime *runtime;
-       struct snd_soc_component *sof_comp;
+       struct snd_soc_component *sof_comp = NULL;
        int i;
 
        /* 1. find sof component */