From: Dan Carpenter Date: Wed, 2 Dec 2020 06:51:46 +0000 (+0300) Subject: ASoC: codecs: lpass-va-macro: remove some dead code X-Git-Tag: v5.15~1735^2~15^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d638b9cc79eff11bad13fb3715c0ef38a9edaec;p=platform%2Fkernel%2Flinux-starfive.git 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 Link: https://lore.kernel.org/r/X8c5gjZO7YN/CFsq@mwanda Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index 3e6bbef..91e6890 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; }