[ 3.5.y.z extended stable ] Patch "ASoC: core: Double control update err for" has been added to staging queue

Herton Ronaldo Krzesinski herton.krzesinski at canonical.com
Fri Dec 7 16:05:02 UTC 2012


This is a note to let you know that I have just added a patch titled

    ASoC: core: Double control update err for

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Herton

------

>From 96ec684b73ed5d61463edbbec8f1c974fca4af19 Mon Sep 17 00:00:00 2001
From: Mukund Navada <navada at ti.com>
Date: Fri, 9 Nov 2012 11:53:40 +0530
Subject: [PATCH] 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 at ti.com>
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
---
 sound/soc/soc-core.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b37ee80..ed038b9 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2692,8 +2692,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;
--
1.7.9.5





More information about the kernel-team mailing list