From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 4/6] ASoC: samsung: snow: remove useless test
Date: Fri, 19 Feb 2021 17:09:16 -0600 [thread overview]
Message-ID: <20210219230918.5058-5-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20210219230918.5058-1-pierre-louis.bossart@linux.intel.com>
cppcheck warning:
sound/soc/samsung/snow.c:112:2: style:inconclusive: Found duplicate
branches for 'if' and 'else'. [duplicateBranch]
if (rtd->num_codecs > 1)
^
sound/soc/samsung/snow.c:114:2: note: Found duplicate branches for
'if' and 'else'.
else
^
sound/soc/samsung/snow.c:112:2: note: Found duplicate branches for
'if' and 'else'.
if (rtd->num_codecs > 1)
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
sound/soc/samsung/snow.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c
index 989af624dd11..6da674e901ca 100644
--- a/sound/soc/samsung/snow.c
+++ b/sound/soc/samsung/snow.c
@@ -109,10 +109,7 @@ static int snow_late_probe(struct snd_soc_card *card)
rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]);
/* In the multi-codec case codec_dais 0 is MAX98095 and 1 is HDMI. */
- if (rtd->num_codecs > 1)
- codec_dai = asoc_rtd_to_codec(rtd, 0);
- else
- codec_dai = asoc_rtd_to_codec(rtd, 0);
+ codec_dai = asoc_rtd_to_codec(rtd, 0);
/* Set the MCLK rate for the codec */
return snd_soc_dai_set_sysclk(codec_dai, 0,
--
2.25.1
next prev parent reply other threads:[~2021-02-19 23:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 23:09 [PATCH 0/6] ASoC: samsung: remove cppcheck warnings Pierre-Louis Bossart
2021-02-19 23:09 ` [PATCH 1/6] ASoC: samsung: i2s: remove unassigned variable Pierre-Louis Bossart
2021-02-21 10:53 ` Krzysztof Kozlowski
2021-02-19 23:09 ` [PATCH 2/6] ASoC: samsung: s3c24xx_simtec: add missing error check Pierre-Louis Bossart
2021-02-21 10:55 ` Krzysztof Kozlowski
2021-02-19 23:09 ` [PATCH 3/6] ASoC: samsung: smdk_wm8994: add missing return Pierre-Louis Bossart
2021-02-21 10:59 ` Krzysztof Kozlowski
2021-02-19 23:09 ` Pierre-Louis Bossart [this message]
2021-02-21 11:04 ` [PATCH 4/6] ASoC: samsung: snow: remove useless test Krzysztof Kozlowski
2021-02-19 23:09 ` [PATCH 5/6] ASoC: samsung: tm2_wm5110: check of_parse return value Pierre-Louis Bossart
2021-02-21 11:10 ` Krzysztof Kozlowski
2021-02-22 15:35 ` Pierre-Louis Bossart
2021-02-22 17:28 ` Krzysztof Kozlowski
2021-02-19 23:09 ` [PATCH 6/6] ASoC: samsung: tm2_wm5510: remove shadowing variable Pierre-Louis Bossart
2021-02-21 11:12 ` Krzysztof Kozlowski
2021-02-22 15:36 ` Pierre-Louis Bossart
2021-02-23 11:30 ` Sylwester Nawrocki
2021-02-22 16:07 ` (subset) [PATCH 0/6] ASoC: samsung: remove cppcheck warnings Mark Brown
2021-02-22 17:31 ` Krzysztof Kozlowski
2021-02-22 20:19 ` Mark Brown
2021-02-22 20:39 ` Pierre-Louis Bossart
2021-03-01 23:34 ` 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=20210219230918.5058-5-pierre-louis.bossart@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=krzk@kernel.org \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).