Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: Sang-Heon Jeon <ekffu200098@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Subject: Re: [PATCH v2 1/4] ASoC: amd: acp: remove conditional return with no effect
Date: Mon, 27 Jul 2026 10:14:12 +0530	[thread overview]
Message-ID: <f8ca1f18-ca74-4dce-8015-a99cb196b862@amd.com> (raw)
In-Reply-To: <20260725160344.916838-2-ekffu200098@gmail.com>



On 7/25/26 21:33, Sang-Heon Jeon wrote:
> [You don't often get email from ekffu200098@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Both branches of the check return the same value, so the check has
> no effect. Remove it and return the value directly.
>
> This is the result of running the Coccinelle script from
> scripts/coccinelle/misc/cond_return_no_effect.cocci.
>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
> ---
>   sound/soc/amd/acp/acp-mach-common.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c
> index ef784cca13f2..01a0aaa60246 100644
> --- a/sound/soc/amd/acp/acp-mach-common.c
> +++ b/sound/soc/amd/acp/acp-mach-common.c
> @@ -938,15 +938,10 @@ static int acp_max98388_hw_params(struct snd_pcm_substream *substream,
>          struct snd_soc_dai *codec_dai =
>                          snd_soc_card_get_codec_dai(card,
>                                                     MAX98388_CODEC_DAI);
> -       int ret;
>
> -       ret = snd_soc_dai_set_fmt(codec_dai,
> -                                 SND_SOC_DAIFMT_CBC_CFC | SND_SOC_DAIFMT_I2S |
> -                                 SND_SOC_DAIFMT_NB_NF);
> -       if (ret < 0)
> -               return ret;
> -
> -       return ret;
> +       return snd_soc_dai_set_fmt(codec_dai,
> +                                  SND_SOC_DAIFMT_CBC_CFC | SND_SOC_DAIFMT_I2S |
> +                                  SND_SOC_DAIFMT_NB_NF);
>   }
>
>   static const struct snd_soc_ops acp_max98388_ops = {
> --
> 2.43.0
>


  reply	other threads:[~2026-07-27  4:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-25 16:03 [PATCH v2 0/4] ASoC: remove conditional returns with no effect Sang-Heon Jeon
2026-07-25 16:03 ` [PATCH v2 1/4] ASoC: amd: acp: remove conditional return " Sang-Heon Jeon
2026-07-27  4:44   ` Mukunda,Vijendar [this message]
2026-07-25 16:03 ` [PATCH v2 2/4] ASoC: Intel: atom: " Sang-Heon Jeon
2026-07-27  9:30   ` Cezary Rojewski
2026-07-25 16:03 ` [PATCH v2 3/4] ASoC: samsung: smdk_spdif: " Sang-Heon Jeon
2026-07-25 16:03 ` [PATCH v2 4/4] ASoC: SOF: Intel: " Sang-Heon Jeon
2026-07-27 13:09 ` [PATCH v2 0/4] ASoC: remove conditional returns " 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=f8ca1f18-ca74-4dce-8015-a99cb196b862@amd.com \
    --to=vijendar.mukunda@amd.com \
    --cc=broonie@kernel.org \
    --cc=ekffu200098@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=venkataprasad.potturu@amd.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