[PATCH] ASoC: mediatek: mt8195: silence uninitialized variable warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c b/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
index b240610dcef0..11a185da0d96 100644
--- a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
+++ b/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
@@ -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 */
-- 
2.20.1




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux