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>
This commit is contained in:
Dan Carpenter 2013-02-07 11:28:48 +03:00 committed by Takashi Iwai
parent f9afed1f7f
commit b57a895fa2
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@
static void snd_wm8766_write(struct snd_wm8766 *wm, u16 addr, u16 data)
{
if (addr < WM8766_REG_RESET)
if (addr < WM8766_REG_COUNT)
wm->regs[addr] = data;
wm->ops.write(wm, addr, data);
}