diff options
author | Mukund Navada <navada@ti.com> | 2012-11-09 01:23:40 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-09 11:32:05 -0500 |
commit | d055852ee86703d48b0c571e94bd2eb33aa9b91d (patch) | |
tree | b58298a6285cf169c66f55d55619c2975ade192d /sound | |
parent | 445632ad6dda42f4d3f9df2569a852ca0d4ea608 (diff) |
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')
-rw-r--r-- | sound/soc/soc-core.c | 5 |
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, | |||
2786 | val = (ucontrol->value.integer.value[0] + min) & mask; | 2786 | val = (ucontrol->value.integer.value[0] + min) & mask; |
2787 | val = val << shift; | 2787 | val = val << shift; |
2788 | 2788 | ||
2789 | if (snd_soc_update_bits_locked(codec, reg, val_mask, val)) | 2789 | err = snd_soc_update_bits_locked(codec, reg, val_mask, val); |
2790 | return err; | 2790 | if (err < 0) |
2791 | return err; | ||
2791 | 2792 | ||
2792 | if (snd_soc_volsw_is_stereo(mc)) { | 2793 | if (snd_soc_volsw_is_stereo(mc)) { |
2793 | val_mask = mask << rshift; | 2794 | val_mask = mask << rshift; |