From: Matthias Brugger <matthias.bgg@gmail.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
broonie@kernel.org
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
trevor.wu@mediatek.com, amergnat@baylibre.com,
dan.carpenter@linaro.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH 2/5] ASoC: mediatek: mt8188-mt6359: clean up a return in codec_init
Date: Thu, 8 Jun 2023 18:48:39 +0200 [thread overview]
Message-ID: <e548940b-cda3-05e6-2c31-80c286d5025c@gmail.com> (raw)
In-Reply-To: <20230608084727.74403-3-angelogioacchino.delregno@collabora.com>
On 08/06/2023 10:47, AngeloGioacchino Del Regno wrote:
> From: Dan Carpenter <dan.carpenter@linaro.org>
>
> 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>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> 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 643a7a12a96b..b2735496d140 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,
next prev parent reply other threads:[~2023-06-08 16:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 8:47 [PATCH 0/5] ASoC: mt8188-mt6359: Cleanups AngeloGioacchino Del Regno
2023-06-08 8:47 ` [PATCH 1/5] ASoC: mediatek: mt8188-mt6359: Compress of_device_id entries AngeloGioacchino Del Regno
2023-06-08 9:31 ` Alexandre Mergnat
2023-06-08 16:48 ` Matthias Brugger
2023-06-08 8:47 ` [PATCH 2/5] ASoC: mediatek: mt8188-mt6359: clean up a return in codec_init AngeloGioacchino Del Regno
2023-06-08 9:32 ` Alexandre Mergnat
2023-06-08 16:48 ` Matthias Brugger [this message]
2023-06-08 8:47 ` [PATCH 3/5] ASoC: mediatek: mt8188-mt6359: Cleanup return 0 disguised as return ret AngeloGioacchino Del Regno
2023-06-08 9:33 ` Alexandre Mergnat
2023-06-08 16:49 ` Matthias Brugger
2023-06-08 8:47 ` [PATCH 4/5] ASoC: mediatek: mt8188-mt6359: Clean up log levels AngeloGioacchino Del Regno
2023-06-08 9:34 ` Alexandre Mergnat
2023-06-08 8:47 ` [PATCH 5/5] ASoC: mediatek: mt8188-mt6359: Use bitfield macros for registers AngeloGioacchino Del Regno
2023-06-08 9:50 ` Alexandre Mergnat
2023-06-08 9:57 ` AngeloGioacchino Del Regno
2023-06-08 10:00 ` Alexandre Mergnat
2023-06-08 10:03 ` Trevor Wu (吳文良)
2023-06-08 10:07 ` AngeloGioacchino Del Regno
2023-06-08 11:02 ` Trevor Wu (吳文良)
2023-06-08 11:20 ` AngeloGioacchino Del Regno
2023-06-08 15:18 ` [PATCH 0/5] ASoC: mt8188-mt6359: Cleanups 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=e548940b-cda3-05e6-2c31-80c286d5025c@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=amergnat@baylibre.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=kernel@collabora.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--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