ASoC: core: Double control update err for snd_soc_put_volsw_sx
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> Cc: stable@vger.kernel.org
This commit is contained in:
parent
445632ad6d
commit
d055852ee8
1 changed files with 3 additions and 2 deletions
|
@ -2786,8 +2786,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;
|
||||
|
|
Loading…
Add table
Reference in a new issue