mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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: 908e6b1df2
("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>
This commit is contained in:
parent
569c167ce3
commit
4d638b9cc7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user