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

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Dec. 7, 2012, 4:05 p.m.
Message ID <1354896302-22177-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/204546/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Dec. 7, 2012, 4:05 p.m.
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@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@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 sound/soc/soc-core.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--
1.7.9.5

Patch

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;