From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Sang-Heon Jeon <ekffu200098@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-sound@vger.kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH v2 2/4] ASoC: Intel: atom: remove conditional return with no effect
Date: Mon, 27 Jul 2026 11:30:08 +0200 [thread overview]
Message-ID: <65cc9293-b7fb-4604-a8cf-34f6181b8f22@intel.com> (raw)
In-Reply-To: <20260725160344.916838-3-ekffu200098@gmail.com>
On 7/25/2026 6:03 PM, Sang-Heon Jeon wrote:
> 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>
> ---
> sound/soc/intel/atom/sst-mfld-platform-pcm.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> index 9ee4d9926e06..a4c8cbfba096 100644
> --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> @@ -236,12 +236,7 @@ static int sst_platform_alloc_stream(struct snd_pcm_substream *substream,
>
> stream->stream_info.str_id = str_params.stream_id;
>
> - ret_val = stream->ops->open(sst->dev, &str_params);
> - if (ret_val <= 0)
> - return ret_val;
> -
> -
> - return ret_val;
> + return stream->ops->open(sst->dev, &str_params);
> }
>
> static void sst_period_elapsed(void *arg)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
next prev parent reply other threads:[~2026-07-27 9:30 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
2026-07-25 16:03 ` [PATCH v2 2/4] ASoC: Intel: atom: " Sang-Heon Jeon
2026-07-27 9:30 ` Cezary Rojewski [this message]
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=65cc9293-b7fb-4604-a8cf-34f6181b8f22@intel.com \
--to=cezary.rojewski@intel.com \
--cc=broonie@kernel.org \
--cc=ekffu200098@gmail.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.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