From 3ebb5c9b1056b7eaae3e5dd11b97e2830797e51c Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sun, 9 Oct 2011 14:06:13 +0100 Subject: 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 --- sound/soc/soc-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) if (ret == 0) return val; else - return ret; + return -1; } ret = snd_soc_cache_read(codec, reg, &val); -- cgit