From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.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
Subject: [PATCH v2 3/4] ASoC: samsung: smdk_spdif: remove conditional return with no effect
Date: Sun, 26 Jul 2026 01:03:42 +0900 [thread overview]
Message-ID: <20260725160344.916838-4-ekffu200098@gmail.com> (raw)
In-Reply-To: <20260725160344.916838-1-ekffu200098@gmail.com>
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/samsung/smdk_spdif.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/samsung/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c
index 2474eb619882..515e4dfc1432 100644
--- a/sound/soc/samsung/smdk_spdif.c
+++ b/sound/soc/samsung/smdk_spdif.c
@@ -130,12 +130,8 @@ static int smdk_hw_params(struct snd_pcm_substream *substream,
return ret;
/* Set S/PDIF uses internal source clock */
- ret = snd_soc_dai_set_sysclk(cpu_dai, SND_SOC_SPDIF_INT_MCLK,
- rclk_rate, SND_SOC_CLOCK_IN);
- if (ret < 0)
- return ret;
-
- return ret;
+ return snd_soc_dai_set_sysclk(cpu_dai, SND_SOC_SPDIF_INT_MCLK,
+ rclk_rate, SND_SOC_CLOCK_IN);
}
static const struct snd_soc_ops smdk_spdif_ops = {
--
2.43.0
next prev parent reply other threads:[~2026-07-25 16:04 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 " 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
2026-07-25 16:03 ` Sang-Heon Jeon [this message]
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=20260725160344.916838-4-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=s.nawrocki@samsung.com \
--cc=tiwai@suse.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
all inboxes | Powered by JetHome®