diff options
author | Mukund Navada <navada@ti.com> | 2012-11-09 11:53:40 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-26 12:14:09 -0800 |
commit | 176b18a140915eb8d684ed823967f3010e8ac3bc (patch) | |
tree | 2a10f882c8303407acc14613facf4393b3085fb2 /sound | |
parent | c392855dfc4259992947d4a960b57df4c19b71bc (diff) | |
download | linux-stable-176b18a140915eb8d684ed823967f3010e8ac3bc.tar.gz linux-stable-176b18a140915eb8d684ed823967f3010e8ac3bc.tar.bz2 linux-stable-176b18a140915eb8d684ed823967f3010e8ac3bc.zip |
ASoC: core: Double control update err for snd_soc_put_volsw_sx
commit d055852ee86703d48b0c571e94bd2eb33aa9b91d upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 c501af6d8dbe..8bf05d7a86ca 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2776,8 +2776,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; |