aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl4030.c
diff options
context:
space:
mode:
authorIan Molton <ian@mnementh.co.uk>2009-01-17 12:44:23 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-19 11:23:13 -0500
commit91432e976ff1323e5dd6f52498969602953c6ee9 (patch)
treee18da7346b857e384a78ecc3368e5c65652ef1b5 /sound/soc/codecs/twl4030.c
parent28796eaf806502b9bd86cbacf8edbc14c80c14b0 (diff)
ASoC: fixes to caching implementations
This patch takes fixes a number of bugs in the caching code used by several ASoC codec drivers. Mostly off-by-one fixes. Signed-off-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r--sound/soc/codecs/twl4030.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index ddc9f37d863f..f530c1e6d9e8 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -125,6 +125,9 @@ static inline unsigned int twl4030_read_reg_cache(struct snd_soc_codec *codec,
125{ 125{
126 u8 *cache = codec->reg_cache; 126 u8 *cache = codec->reg_cache;
127 127
128 if (reg >= TWL4030_CACHEREGNUM)
129 return -EIO;
130
128 return cache[reg]; 131 return cache[reg];
129} 132}
130 133