summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-12-02 09:51:46 +0300
committerMark Brown <broonie@kernel.org>2020-12-02 15:18:23 +0000
commit4d638b9cc79eff11bad13fb3715c0ef38a9edaec (patch)
tree9178598963581ec44084753c03b0eec179cd04ea /sound
parent569c167ce3bb145662cbdd37924017f5a3071024 (diff)
downloadlinux-4d638b9cc79eff11bad13fb3715c0ef38a9edaec.tar.bz2
ASoC: codecs: lpass-va-macro: remove some dead code
The "decimator" variable is in the 0-7 range and it's unsigned so there is no need to check for negative values. Fixes: 908e6b1df26e ("ASoC: codecs: lpass-va-macro: Add support to VA Macro") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X8c5gjZO7YN/CFsq@mwanda Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/lpass-va-macro.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
index 3e6bbef26dcb..91e6890d6efc 100644
--- a/sound/soc/codecs/lpass-va-macro.c
+++ b/sound/soc/codecs/lpass-va-macro.c
@@ -844,17 +844,10 @@ static int va_macro_hw_params(struct snd_pcm_substream *substream,
for_each_set_bit(decimator, &va->active_ch_mask[dai->id],
VA_MACRO_DEC_MAX) {
- if (decimator >= 0) {
- tx_fs_reg = CDC_VA_TX0_TX_PATH_CTL +
- VA_MACRO_TX_PATH_OFFSET * decimator;
- snd_soc_component_update_bits(component, tx_fs_reg,
- 0x0F, tx_fs_rate);
- } else {
- dev_err(va_dev,
- "%s: ERROR: Invalid decimator: %d\n",
- __func__, decimator);
- return -EINVAL;
- }
+ tx_fs_reg = CDC_VA_TX0_TX_PATH_CTL +
+ VA_MACRO_TX_PATH_OFFSET * decimator;
+ snd_soc_component_update_bits(component, tx_fs_reg, 0x0F,
+ tx_fs_rate);
}
return 0;
}