summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMukund Navada <navada@ti.com>2012-11-09 11:53:40 +0530
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-09 16:32:05 +0000
commitd055852ee86703d48b0c571e94bd2eb33aa9b91d (patch)
treeb58298a6285cf169c66f55d55619c2975ade192d /sound/soc
parent445632ad6dda42f4d3f9df2569a852ca0d4ea608 (diff)
downloadlinux-d055852ee86703d48b0c571e94bd2eb33aa9b91d.tar.bz2
ASoC: core: Double control update err for snd_soc_put_volsw_sx
snd_soc_put_volsw_sx function fails to update second control if first control is updated by snd_soc_update_bits_locked. Signed-off-by: Mukund Navada <navada@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d1198627fc40..10d21be383f6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2786,8 +2786,9 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
val = (ucontrol->value.integer.value[0] + min) & mask;
val = val << shift;
- if (snd_soc_update_bits_locked(codec, reg, val_mask, val))
- return err;
+ err = snd_soc_update_bits_locked(codec, reg, val_mask, val);
+ if (err < 0)
+ return err;
if (snd_soc_volsw_is_stereo(mc)) {
val_mask = mask << rshift;