summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-06-15 15:14:31 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-06-16 12:07:35 +0100
commitf1df5aec68946e427eb4884c4d80e3259361478c (patch)
tree2eaceaff08f06b598a163a122a3aaa41fbb3f9f7 /sound/soc/soc-core.c
parente71fa370428aa80e3acc3a49f8df1e76e7719347 (diff)
downloadtalos-obmc-linux-f1df5aec68946e427eb4884c4d80e3259361478c.tar.gz
talos-obmc-linux-f1df5aec68946e427eb4884c4d80e3259361478c.zip
ASoC: Pay attention to write errors in volsw_2r_sx
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 254dd1c6914d..26f17323ef19 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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;
OpenPOWER on IntegriCloud