提交 b57a895f 编写于 作者: D Dan Carpenter 提交者: Takashi Iwai

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 f9afed1f
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册