Skip to content

Commit

Permalink
ASoC: Pay attention to write errors in volsw_2r_sx
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Mark Brown committed Jun 16, 2010
1 parent e71fa37 commit f1df5ae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2433,14 +2433,12 @@ int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol,
if (oval != val) {
ret = snd_soc_write(codec, mc->reg, val);
if (ret < 0)
return 0;
ret = 1;
return ret;
}
if (ovalr != valr) {
ret = snd_soc_write(codec, mc->rreg, valr);
if (ret < 0)
return 0;
ret = 1;
return ret;
}

return 0;
Expand Down

0 comments on commit f1df5ae

Please sign in to comment.