aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-02-07 03:28:48 -0500
committerTakashi Iwai <tiwai@suse.de>2013-02-07 03:52:15 -0500
commitb57a895fa2188d4e1cefa030d0fc9d126e453a95 (patch)
treefb935fc0a4b59713470cab53ea99b4919b989e24
parentf9afed1f7fcadcad2b91f79aa81adf9456864117 (diff)
ALSA: ice1712: fix boundary check in snd_wm8766_write()
The wm->regs[] array has WM8766_REG_COUNT (16) elements not WM8766_REG_RESET (31). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ice1712/wm8766.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/ice1712/wm8766.c b/sound/pci/ice1712/wm8766.c
index 8072adeecf68..e473f8a88f9c 100644
--- a/sound/pci/ice1712/wm8766.c
+++ b/sound/pci/ice1712/wm8766.c
@@ -31,7 +31,7 @@
31 31
32static void snd_wm8766_write(struct snd_wm8766 *wm, u16 addr, u16 data) 32static void snd_wm8766_write(struct snd_wm8766 *wm, u16 addr, u16 data)
33{ 33{
34 if (addr < WM8766_REG_RESET) 34 if (addr < WM8766_REG_COUNT)
35 wm->regs[addr] = data; 35 wm->regs[addr] = data;
36 wm->ops.write(wm, addr, data); 36 wm->ops.write(wm, addr, data);
37} 37}