summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-cache.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-10-07 04:39:31 +0200
committerDavid S. Miller <davem@davemloft.net>2010-10-07 04:39:31 +0200
commit69259abb64d4da77273bf59accfc9fa79e7165f4 (patch)
treebd043ab03a788b749c8d5ae4049d8defae9abf34 /sound/soc/soc-cache.c
parentbonding: add Speed/Duplex information to /proc/net/bonding/bond (diff)
parentMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds... (diff)
downloadlinux-69259abb64d4da77273bf59accfc9fa79e7165f4.tar.xz
linux-69259abb64d4da77273bf59accfc9fa79e7165f4.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/pcmcia/pcnet_cs.c net/caif/caif_socket.c
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;