summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-cache.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-25 17:57:49 +0200
committerTakashi Iwai <tiwai@suse.de>2010-09-25 17:57:49 +0200
commitb614e38e78ec1aacf80fd6124cfcc6e45925647c (patch)
tree1a76b07ef87fbfe1e62ac8989071a811ddfd90ec /sound/soc/soc-cache.c
parente68d3b316ab7b02a074edc4f770e6a746390cb7d (diff)
parent0077ca0b5c986477e33451b797b6e7dc92a8bbc0 (diff)
downloadlinux-stable-b614e38e78ec1aacf80fd6124cfcc6e45925647c.tar.gz
linux-stable-b614e38e78ec1aacf80fd6124cfcc6e45925647c.tar.bz2
linux-stable-b614e38e78ec1aacf80fd6124cfcc6e45925647c.zip
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'sound/soc/soc-cache.c')
-rw-r--r--sound/soc/soc-cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index adbc68ce9050..f6b0d2829ea9 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -203,8 +203,9 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
data[1] = (value >> 8) & 0xff;
data[2] = value & 0xff;
- if (!snd_soc_codec_volatile_register(codec, reg))
- reg_cache[reg] = value;
+ if (!snd_soc_codec_volatile_register(codec, reg)
+ && reg < codec->reg_cache_size)
+ reg_cache[reg] = value;
if (codec->cache_only) {
codec->cache_sync = 1;