ALSA: usb-audio: Fix packet size calculation regression
authorTakashi Iwai <tiwai@suse.de>
Fri, 1 Oct 2021 10:54:25 +0000 (12:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:37 +0000 (09:04 +0100)
commitc7ac29edfb6ab28d1a0de14446aa1284e08911aa
treeaf5fe89d02aa8dd1af498164b9526b7f5152d60f
parent458871f21e693ce64906b7481bd4aa522c6aceb6
ALSA: usb-audio: Fix packet size calculation regression

commit 23939115be181bc5dbc33aa8471adcdbffa28910 upstream.

The commit d215f63d49da ("ALSA: usb-audio: Check available frames for
the next packet size") introduced the available frame size check, but
the conversion forgot to initialize the temporary variable properly,
and it resulted in a bogus calculation.  This patch fixes it.

Fixes: d215f63d49da ("ALSA: usb-audio: Check available frames for the next packet size")
Reported-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20211001104417.14291-1-colin.king@canonical.com
Link: https://lore.kernel.org/r/20211001105425.16191-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/endpoint.c