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>
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 254dd1c..26f1732 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2433,14 +2433,12 @@
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;