]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: snd-usb-caiaq: fix stream count check
authorDaniel Mack <daniel@zonque.org>
Sun, 4 Jan 2015 18:59:29 +0000 (19:59 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 5 Jan 2015 07:56:19 +0000 (08:56 +0100)
commitf66c874660ee32a4cda7ed7aab400e7f45dfe364
tree58b313a1df09183fd4aa86f034dc5b7dbfb2da2a
parent66c8707ed3f9228ed71d6f4f9608572c2730c95a
ALSA: snd-usb-caiaq: fix stream count check

Commit 01c9891e7 ("ALSA: usb: caiaq: check for cdev->n_streams > 1")
introduced a safety check to protect against bogus data provided by
devices. However, the n_streams variable is already divided by
CHANNELS_PER_STREAM, so the correct check is 'n_streams > 0'.

Fix this to un-break support for stereo devices.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Cc: stable@kernel.org [v3.18+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/caiaq/audio.c