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

ALSA: usb-audio: Fix unintentional sign extension issue

The shifting of the u8 integer device by 24 bits to the left will
be promoted to a 32 bit signed int and then sign-extended to a
64 bit unsigned long. In the event that the top bit of device is
set then all then all the upper 32 bits of the unsigned long will
end up as also being set because of the sign-extension. Fix this
by casting device to an unsigned long before the shift.

Addresses-Coverity: ("Unintended sign extension")
Fixes: a07df82c

 ("ALSA: usb-audio: Add DJM750 to Pioneer mixer quirk")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210318132008.15266-1-colin.king@canonical.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f4df9ee6
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