diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-09 09:06:13 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-09 09:35:59 -0400 |
commit | 3ebb5c9b1056b7eaae3e5dd11b97e2830797e51c (patch) | |
tree | 547b4a260aa35e58b147ec1f30ab0b41675c2d74 /sound/soc/soc-io.c | |
parent | 024dc078558e64e4cebc62c096285430a61dd10e (diff) |
ASoC: Squash error codes from regmap down to -1 on read
The ASoC code always uses -1 as the error code due to reporting errors in
band with the value. Ensure we don't confuse anything by making sure we
don't pass actual error codes back into the rest of the code on read.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-io.c')
-rw-r--r-- | sound/soc/soc-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index 66fcccd79efe..dd89933e2c72 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c | |||
@@ -55,7 +55,7 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg) | |||
55 | if (ret == 0) | 55 | if (ret == 0) |
56 | return val; | 56 | return val; |
57 | else | 57 | else |
58 | return ret; | 58 | return -1; |
59 | } | 59 | } |
60 | 60 | ||
61 | ret = snd_soc_cache_read(codec, reg, &val); | 61 | ret = snd_soc_cache_read(codec, reg, &val); |