diff --git a/[refs] b/[refs] index e0cc8d32b5a6..8afdae619af0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f9887d11e7c59ebae5e464f30a6dde788ed9011 +refs/heads/master: e49b68339ebc7d2e67dc1ae16a4ac6a35fcfc9d5 diff --git a/trunk/sound/soc/codecs/twl6040.c b/trunk/sound/soc/codecs/twl6040.c index 11f681b15dec..4ad04e3d5c40 100644 --- a/trunk/sound/soc/codecs/twl6040.c +++ b/trunk/sound/soc/codecs/twl6040.c @@ -796,20 +796,14 @@ static int twl6040_get_volsw(struct snd_kcontrol *kcontrol, out = &twl6040_priv->handsfree; break; default: - break; - } - - if (out) { - ucontrol->value.integer.value[0] = out->left_vol; - ucontrol->value.integer.value[1] = out->right_vol; - return 0; + dev_warn(codec->dev, "%s: Unexpected register: 0x%02x\n", + __func__, mc->reg); + return -EINVAL; } - /* call the appropriate handler depending on the rreg */ - if (mc->rreg) - return snd_soc_get_volsw_2r(kcontrol, ucontrol); - else - return snd_soc_get_volsw(kcontrol, ucontrol); + ucontrol->value.integer.value[0] = out->left_vol; + ucontrol->value.integer.value[1] = out->right_vol; + return 0; } /*