diff options
Diffstat (limited to 'sound/soc/codecs/wm8990.c')
-rw-r--r-- | sound/soc/codecs/wm8990.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 572d22b0880b..5c84f02c4579 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -106,6 +106,7 @@ static const u16 wm8990_reg[] = { | |||
106 | 0x0008, /* R60 - PLL1 */ | 106 | 0x0008, /* R60 - PLL1 */ |
107 | 0x0031, /* R61 - PLL2 */ | 107 | 0x0031, /* R61 - PLL2 */ |
108 | 0x0026, /* R62 - PLL3 */ | 108 | 0x0026, /* R62 - PLL3 */ |
109 | 0x0000, /* R63 - Driver internal */ | ||
109 | }; | 110 | }; |
110 | 111 | ||
111 | /* | 112 | /* |
@@ -126,10 +127,9 @@ static inline void wm8990_write_reg_cache(struct snd_soc_codec *codec, | |||
126 | unsigned int reg, unsigned int value) | 127 | unsigned int reg, unsigned int value) |
127 | { | 128 | { |
128 | u16 *cache = codec->reg_cache; | 129 | u16 *cache = codec->reg_cache; |
129 | BUG_ON(reg > (ARRAY_SIZE(wm8990_reg)) - 1); | ||
130 | 130 | ||
131 | /* Reset register is uncached */ | 131 | /* Reset register and reserved registers are uncached */ |
132 | if (reg == 0) | 132 | if (reg == 0 || reg > ARRAY_SIZE(wm8990_reg) - 1) |
133 | return; | 133 | return; |
134 | 134 | ||
135 | cache[reg] = value; | 135 | cache[reg] = value; |