]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix regression on detection of Roland VS-100
authorTakashi Iwai <tiwai@suse.de>
Fri, 24 Mar 2023 07:50:05 +0000 (08:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Apr 2023 09:16:45 +0000 (11:16 +0200)
commit6678da876ba15bf8d2b4b8c96c91115c1aaa106d
tree8b192357032b3d1204b3c68f946030412366e74d
parentae3bd8dbd695c393ec68535cb76db7e20f416dc6
ALSA: usb-audio: Fix regression on detection of Roland VS-100

commit fa4e7a6fa12b1132340785e14bd439cbe95b7a5a upstream.

It's been reported that the recent kernel can't probe the PCM devices
on Roland VS-100 properly, and it turned out to be a regression by the
recent addition of the bit shift range check for the format bits.
In the old code, we just did bit-shift and it resulted in zero, which
is then corrected to the standard PCM format, while the new code
explicitly returns an error in such a case.

For addressing the regression, relax the check and fallback to the
standard PCM type (with the info output).

Fixes: 2838bcd89ebe ("ALSA: usb-audio: Fix potential out-of-bounds shift")
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217084
Link: https://lore.kernel.org/r/20230324075005.19403-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/format.c