ALSA: hda/realtek - Fix overflow of vol/sw check bitmap
authorTakashi Iwai <tiwai@suse.de>
Thu, 16 Feb 2012 15:38:07 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Mar 2012 00:31:10 +0000 (16:31 -0800)
commit0da0c63e05b5f7de8298753d79304cd137351590
tree3ffb2d5a73bd70086ced33516953b3e09892c8bb
parent8fb548906ee57c17c6a770007075b92b1a9d89b6
ALSA: hda/realtek - Fix overflow of vol/sw check bitmap

commit c14c95f62ecb8710af14ae0d48e01991b70bb6f4 upstream.

The bitmap introduced in the commit [527e4d73: ALSA: hda/realtek - Fix
missing volume controls with ALC260] is too narrow for some codecs,
which may have more NIDs than 0x20, thus it may overflow the bitmap
array on them.

Just double the number to cover all and also add a sanity-check code
to be safer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_realtek.c