summaryrefslogtreecommitdiff
path: root/sound/soc/soc-ops.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2021-02-18 16:19:16 -0600
committerMark Brown <broonie@kernel.org>2021-03-10 13:06:53 +0000
commit7ca5f04946176ae9611bb80e3ec3d3fa300b7cff (patch)
tree615b628493ed6bfe35eb02350c4c25024eb10b82 /sound/soc/soc-ops.c
parente92a309be437b761c6972502386ea717c6fed027 (diff)
ASoC: soc-ops: remove useless assignment
cppcheck warning: sound/soc/soc-ops.c:410:35: style: Variable 'val2' is assigned a value that is never used. [unreadVariable] unsigned int val, val_mask, val2 = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210218221921.88991-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-ops.c')
-rw-r--r--sound/soc/soc-ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index 10f48827bb0e..58527247df83 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -407,7 +407,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
int min = mc->min;
unsigned int mask = (1U << (fls(min + max) - 1)) - 1;
int err = 0;
- unsigned int val, val_mask, val2 = 0;
+ unsigned int val, val_mask, val2;
val_mask = mask << shift;
val = (ucontrol->value.integer.value[0] + min) & mask;