summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs42l43-sdw.c
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2023-09-28 11:52:00 +0300
committerMark Brown <broonie@kernel.org>2023-09-28 12:53:21 +0300
commit67fcdbfd9e133be69c9541a806f6ccfe594fa9a9 (patch)
tree34a00692de88310b8f7446d1af1b6ac0faee5b1e /sound/soc/codecs/cs42l43-sdw.c
parent6d925797304e345e397bc24e62a334b41503fb1d (diff)
downloadlinux-67fcdbfd9e133be69c9541a806f6ccfe594fa9a9.tar.xz
ASoC: cs42l43: Remove useless else
The assignment of the else and if branches is the same, so the else here is redundant, so we remove it. ./sound/soc/codecs/cs42l43-sdw.c:35:1-3: WARNING: possible condition with no effect (if == else). Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6712 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230928085200.48635-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs42l43-sdw.c')
-rw-r--r--sound/soc/codecs/cs42l43-sdw.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/soc/codecs/cs42l43-sdw.c b/sound/soc/codecs/cs42l43-sdw.c
index 55ac5fe8c3db..388f95853b69 100644
--- a/sound/soc/codecs/cs42l43-sdw.c
+++ b/sound/soc/codecs/cs42l43-sdw.c
@@ -31,11 +31,7 @@ int cs42l43_sdw_add_peripheral(struct snd_pcm_substream *substream,
return -EINVAL;
snd_sdw_params_to_config(substream, params, &sconfig, &pconfig);
-
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- pconfig.num = dai->id;
- else
- pconfig.num = dai->id;
+ pconfig.num = dai->id;
ret = sdw_stream_add_slave(sdw, &sconfig, &pconfig, 1, sdw_stream);
if (ret) {