From: Dan Carpenter <dan.carpenter@linaro.org>
To: Liam Girdwood <lgirdwood@gmail.com>, Trevor Wu <trevor.wu@mediatek.com>
Cc: Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Alexandre Mergnat <amergnat@baylibre.com>,
alsa-devel@alsa-project.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH v2] SoC: mediatek: mt8188-mt6359: clean up a return in codec_init
Date: Wed, 7 Jun 2023 17:57:38 +0300 [thread overview]
Message-ID: <42f2a995-3545-40bf-82a0-fd9b8abc16ce@moroto.mountain> (raw)
This code triggers a Smatch static checker warning and does sort of
look like an error path.
sound/soc/mediatek/mt8188/mt8188-mt6359.c:597 mt8188_max98390_codec_init() warn: missing error code? 'ret'
However, returning 0 is intentional. Make that explicit.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v2: At first I thought this was an error path but it is a not.
sound/soc/mediatek/mt8188/mt8188-mt6359.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
index bc4b74970a46..5ad8d2a5bbc4 100644
--- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c
+++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
@@ -594,7 +594,7 @@ static int mt8188_max98390_codec_init(struct snd_soc_pcm_runtime *rtd)
}
if (rtd->dai_link->num_codecs <= 2)
- return ret;
+ return 0;
/* add widgets/controls/dapm for rear speakers */
ret = snd_soc_dapm_new_controls(&card->dapm, mt8188_rear_spk_widgets,
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-06-07 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 14:57 Dan Carpenter [this message]
2023-06-08 4:02 ` [PATCH v2] SoC: mediatek: mt8188-mt6359: clean up a return in codec_init Trevor Wu (吳文良)
2023-06-08 7:44 ` AngeloGioacchino Del Regno
2023-06-08 8:57 ` Dan Carpenter
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=42f2a995-3545-40bf-82a0-fd9b8abc16ce@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=amergnat@baylibre.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--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