Skip to content

Commit

Permalink
ALSA: ice1712: fix boundary check in snd_wm8766_write()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Takashi Iwai committed Feb 7, 2013
1 parent f9afed1 commit b57a895
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/ice1712/wm8766.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b57a895

Please sign in to comment.