From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>,
Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Mark Brown <broonie@kernel.org>,
Bixuan Cui <cuibixuan@huawei.com>,
Trevor Wu <trevor.wu@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mediatek@lists.infradead.org
Subject: [PATCH] ASoC: mediatek: mt8195: silence uninitialized variable warning
Date: Wed, 8 Dec 2021 18:11:45 +0300 [thread overview]
Message-ID: <20211208151145.GA29257@kili> (raw)
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>
---
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
next reply other threads:[~2021-12-08 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 15:11 Dan Carpenter [this message]
2021-12-08 16:46 ` [PATCH] ASoC: mediatek: mt8195: silence uninitialized variable warning Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211208151145.GA29257@kili \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cuibixuan@huawei.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=rikard.falkeborn@gmail.com \
--cc=tiwai@suse.com \
--cc=trevor.wu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).