[ 29/83] ASoC: core: Double control update err for snd_soc_put_volsw_sx

From: Greg Kroah-Hartman
Date: Thu Nov 22 2012 - 17:12:44 EST


3.6-stable review patch. If anyone has any objections, please let me know.

------------------

From: Mukund Navada <navada@xxxxxx>

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@xxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
sound/soc/soc-core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2776,8 +2776,9 @@ int snd_soc_put_volsw_sx(struct snd_kcon
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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/