summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuan Lin <yualin@google.com>2016-10-14 16:38:09 -0700
committerBen Fennema <fennema@google.com>2016-11-15 11:07:29 -0800
commitfdde21e28c5905cc366fa627a27cb8d1225daa83 (patch)
tree320d59e9c5007fa5c23a3fded5460b7b0ccc8d9d
parentf5189f4cd6c9454a73c2bcd01d17fea45d65b43d (diff)
downloadmediatek-fdde21e28c5905cc366fa627a27cb8d1225daa83.tar.gz
ASoC: check for null function pointer for dummy device read/write, take 2
Change null function pointer's error return code from -EIO to -1 because snd_soc_read and snd_soc_write both have unsigned int as return type. Bug: 28838221 Change-Id: I0667f1f35fa1c23349eb6dcd6cabff616120be86 Signed-off-by: Yuan Lin <yualin@google.com>
-rw-r--r--sound/soc/soc-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a862361f7782..c283a93c476e 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2109,7 +2109,7 @@ unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg)
trace_snd_soc_reg_read(codec, reg, ret);
}
else
- ret = -EIO;
+ ret = -1;
return ret;
}
@@ -2124,7 +2124,7 @@ unsigned int snd_soc_write(struct snd_soc_codec *codec,
return codec->write(codec, reg, val);
}
else
- return -EIO;
+ return -1;
}
EXPORT_SYMBOL_GPL(snd_soc_write);