diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2021-03-03 00:25:05 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-10 16:09:54 +0300 |
commit | 7e66f16251eb59410257a1e5e279e6c949f53171 (patch) | |
tree | fc154725c5eac0cf03ed9db51f68312c5635a86b /sound/soc/codecs/rt1011.c | |
parent | f7c5c16875c2d2b6e1a7f4f1915d125b79be4951 (diff) | |
download | linux-7e66f16251eb59410257a1e5e279e6c949f53171.tar.xz |
ASoC: rt1011: remove redundant test
cppcheck warning:
sound/soc/codecs/rt1011.c:1994:6: style: Condition 'tx_slotnum' is
always true [knownConditionTrueFalse]
if (tx_slotnum)
^
sound/soc/codecs/rt1011.c:1895:24: note: Assuming that condition
'!tx_slotnum' is not redundant
if (tx_slotnum > 2 || !tx_slotnum) {
^
sound/soc/codecs/rt1011.c:1994:6: note: Condition 'tx_slotnum' is
always true
if (tx_slotnum)
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210302212527.55158-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt1011.c')
-rw-r--r-- | sound/soc/codecs/rt1011.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index b9dadc8243b3..39a9f17ca0a9 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -1987,10 +1987,10 @@ static int rt1011_set_tdm_slot(struct snd_soc_dai *dai, RT1011_TDM_I2S_DOCK_EN_1_MASK, tdm_en); snd_soc_component_update_bits(component, RT1011_TDM2_SET_2, RT1011_TDM_I2S_DOCK_EN_2_MASK, tdm_en); - if (tx_slotnum) - snd_soc_component_update_bits(component, RT1011_TDM_TOTAL_SET, - RT1011_ADCDAT1_PIN_CONFIG | RT1011_ADCDAT2_PIN_CONFIG, - RT1011_ADCDAT1_OUTPUT | RT1011_ADCDAT2_OUTPUT); + + snd_soc_component_update_bits(component, RT1011_TDM_TOTAL_SET, + RT1011_ADCDAT1_PIN_CONFIG | RT1011_ADCDAT2_PIN_CONFIG, + RT1011_ADCDAT1_OUTPUT | RT1011_ADCDAT2_OUTPUT); _set_tdm_err_: snd_soc_dapm_mutex_unlock(dapm); |