Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiapeng Chong and committed by
Mark Brown
67fcdbfd 6d925797

+1 -5
+1 -5
sound/soc/codecs/cs42l43-sdw.c
··· 31 31 return -EINVAL; 32 32 33 33 snd_sdw_params_to_config(substream, params, &sconfig, &pconfig); 34 - 35 - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 36 - pconfig.num = dai->id; 37 - else 38 - pconfig.num = dai->id; 34 + pconfig.num = dai->id; 39 35 40 36 ret = sdw_stream_add_slave(sdw, &sconfig, &pconfig, 1, sdw_stream); 41 37 if (ret) {