From: Mark Brown Date: Tue, 15 Jun 2010 14:14:31 +0000 (+0100) Subject: ASoC: Pay attention to write errors in volsw_2r_sx X-Git-Tag: v2.6.36-rc1~6^2~4^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1df5aec68946e427eb4884c4d80e3259361478c;p=profile%2Fcommon%2Fkernel-common.git ASoC: Pay attention to write errors in volsw_2r_sx Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- 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 @@ 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;