Skip to content

Commit

Permalink
ASoC: core: Double control update err for snd_soc_put_volsw_sx
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
  • Loading branch information
Mukund Navada authored and broonie committed Nov 9, 2012
1 parent 445632a commit d055852
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d055852

Please sign in to comment.