summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/tscs454.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2021-03-12 12:22:46 -0600
committerMark Brown <broonie@kernel.org>2021-03-18 13:50:55 +0000
commita2cc1568dc50020a807c94bd14a053dd54e9c35e (patch)
tree56418b087d3544d938a82d6b00a2435499ad6962 /sound/soc/codecs/tscs454.c
parent39e69cef0aa9f6897161a11ed84362f5805c43fd (diff)
downloadlwn-a2cc1568dc50020a807c94bd14a053dd54e9c35e.tar.gz
lwn-a2cc1568dc50020a807c94bd14a053dd54e9c35e.zip
ASoC: tscs454: remove useless test on PLL disable
cppcheck warning: sound/soc/codecs/tscs454.c:730:37: style: Same value in both branches of ternary operator. [duplicateValueTernary] val = pll1 ? FV_PLL1CLKEN_DISABLE : FV_PLL2CLKEN_DISABLE; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210312182246.5153-24-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tscs454.c')
-rw-r--r--sound/soc/codecs/tscs454.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/tscs454.c b/sound/soc/codecs/tscs454.c
index 1bafc9d1101c..43220bb36701 100644
--- a/sound/soc/codecs/tscs454.c
+++ b/sound/soc/codecs/tscs454.c
@@ -727,7 +727,12 @@ static int pll_power_event(struct snd_soc_dapm_widget *w,
if (enable)
val = pll1 ? FV_PLL1CLKEN_ENABLE : FV_PLL2CLKEN_ENABLE;
else
- val = pll1 ? FV_PLL1CLKEN_DISABLE : FV_PLL2CLKEN_DISABLE;
+ /*
+ * FV_PLL1CLKEN_DISABLE and FV_PLL2CLKEN_DISABLE are
+ * identical zero vzalues, there is no need to test
+ * the PLL index
+ */
+ val = FV_PLL1CLKEN_DISABLE;
ret = snd_soc_component_update_bits(component, R_PLLCTL, msk, val);
if (ret < 0) {