ALSA: bits vs bytes bug in snd_card_create()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 23 Jan 2014 08:21:28 +0000 (11:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2014 19:22:18 +0000 (11:22 -0800)
commitdfcede768466b6a0c39128a25541f2f0db6f42bd
tree724c8d56da7070d841eb0231f3c7c5a0b8053d5b
parenta3e79cff3880637211431a0858c796070f3bc1c7
ALSA: bits vs bytes bug in snd_card_create()

commit 4c3773eda49c872a3034382f8ec3080002e715bf upstream.

The test here is intended intended to prevent shift wrapping bugs when
we do "1U << idx2".  We should consider the number of bits in a u32
instead of the number of bytes.

[fix another chunk similarly by tiwai]

Fixes: 7bb2491b35a2 ('ALSA: Add kconfig to specify the max card numbers')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/init.c