]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerTakashi Iwai <tiwai@suse.de>
Thu, 23 Jan 2014 09:50:36 +0000 (10:50 +0100)
commit5a97f4abfcabda362d37212c5e2e677eef3eb1f6
tree3cb218d45c783600fad3eda4570ec3c4ce571353
parenta5017908dd1350410598620af42a198c98b77379
ALSA: bits vs bytes bug in snd_card_create()

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: ebf250983390 ('ALSA: Add kconfig to specify the max card numbers')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/init.c