Commit 4d638b9c authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

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: 908e6b1d ("ASoC: codecs: lpass-va-macro: Add support to VA Macro")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X8c5gjZO7YN/CFsq@mwandaSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 569c167c
...@@ -844,17 +844,10 @@ static int va_macro_hw_params(struct snd_pcm_substream *substream, ...@@ -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], for_each_set_bit(decimator, &va->active_ch_mask[dai->id],
VA_MACRO_DEC_MAX) { VA_MACRO_DEC_MAX) {
if (decimator >= 0) { tx_fs_reg = CDC_VA_TX0_TX_PATH_CTL +
tx_fs_reg = CDC_VA_TX0_TX_PATH_CTL + VA_MACRO_TX_PATH_OFFSET * decimator;
VA_MACRO_TX_PATH_OFFSET * decimator; snd_soc_component_update_bits(component, tx_fs_reg, 0x0F,
snd_soc_component_update_bits(component, tx_fs_reg, tx_fs_rate);
0x0F, tx_fs_rate);
} else {
dev_err(va_dev,
"%s: ERROR: Invalid decimator: %d\n",
__func__, decimator);
return -EINVAL;
}
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment