]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: Pay attention to write errors in volsw_2r_sx
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 15 Jun 2010 14:14:31 +0000 (15:14 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 16 Jun 2010 11:07:35 +0000 (12:07 +0100)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/soc-core.c

index 254dd1c6914d14926f23ab29f6005cfa0d367d15..26f17323ef19dc522616cef49704dd83a75a1b8d 100644 (file)
@@ -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;