]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix incorrect size check for processing/extension units
authorTakashi Iwai <tiwai@suse.de>
Thu, 14 Nov 2019 16:56:12 +0000 (17:56 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 14 Nov 2019 17:01:22 +0000 (18:01 +0100)
commit3663fdd622fb0875654c9faf9273329fd9be618f
tree7a44d7b68c7f9a246b516bc99e0d0342220c973d
parent7eeb5cbb19bc23e49e529ef3bd513d5d0043ed75
ALSA: usb-audio: Fix incorrect size check for processing/extension units

The recently introduced unit descriptor validation had some bug for
processing and extension units, it counts a bControlSize byte twice so
it expected a bigger size than it should have been.  This seems
resulting in a probe error on a few devices.

Fix the calculation for proper checks of PU and EU.

Fixes: 88246bc2bd7c ("ALSA: usb-audio: More validations of descriptor units")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191114165613.7422-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/validate.c