From 445eab318420953636acff0c4342677d0573ae65 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 4 Oct 2011 14:39:42 +0300 Subject: [PATCH] --- yaml --- r: 270763 b: refs/heads/master c: bfd3d4e9fbb9705181b821b478cc044911e47320 h: refs/heads/master i: 270761: 6d7733ba25431ad51b51c740b6bf40b02e6b3b50 270759: 395b5a0a9e457c2b04670fffa3927506a3eaa99d v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/twl6040.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 26917322cb27..e34ccb6e763c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cdffa775e72de3a3d3ddccd04eb4eb94d58e84e6 +refs/heads/master: bfd3d4e9fbb9705181b821b478cc044911e47320 diff --git a/trunk/sound/soc/codecs/twl6040.c b/trunk/sound/soc/codecs/twl6040.c index d040905cfa9b..8c740c1aa32f 100644 --- a/trunk/sound/soc/codecs/twl6040.c +++ b/trunk/sound/soc/codecs/twl6040.c @@ -759,15 +759,13 @@ static int twl6040_put_volsw(struct snd_kcontrol *kcontrol, out = &twl6040_priv->handsfree; break; default: - break; + return -EINVAL; } - if (out) { - out->left_vol = ucontrol->value.integer.value[0]; - out->right_vol = ucontrol->value.integer.value[1]; - if (!out->active) - return 1; - } + out->left_vol = ucontrol->value.integer.value[0]; + out->right_vol = ucontrol->value.integer.value[1]; + if (!out->active) + return 1; /* call the appropriate handler depending on the rreg */ if (mc->rreg)