Skip to content
Commit 2acf5a3e authored by Colin Ian King's avatar Colin Ian King Committed by Takashi Iwai
Browse files

ALSA: usb-audio: fix sign unintended sign extension on left shifts



There are a couple of left shifts of unsigned 8 bit values that
first get promoted to signed ints and hence get sign extended
on the shift if the top bit of the 8 bit values are set. Fix
this by casting the 8 bit values to unsigned ints to stop the
unintentional sign extension.

Addresses-Coverity: ("Unintended sign extension")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 503d90b3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment