]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant
authorBorislav Petkov <bp@suse.de>
Tue, 5 Apr 2022 15:15:08 +0000 (17:15 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 22 Jun 2022 12:22:13 +0000 (14:22 +0200)
commitd70d91c0df07714721a2cf5f86310cd8641055bf
tree349eacd4ff5269386bb4b460c37021bf66019467
parent64425ecd6fd2cf6cb846bcec21ba2a3db3743796
ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant

BugLink: https://bugs.launchpad.net/bugs/1972905
[ Upstream commit 1ef8715975de8bd481abbd0839ed4f49d9e5b0ff ]

Fix:

  sound/usb/midi.c: In function ‘snd_usbmidi_out_endpoint_create’:
  sound/usb/midi.c:1389:2: error: case label does not reduce to an integer constant
    case USB_ID(0xfc08, 0x0101): /* Unknown vendor Cable */
    ^~~~

See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
details as to why it triggers with older gccs only.

[ A slight correction with parentheses around the argument by tiwai ]

Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220405151517.29753-3-bp@alien8.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
sound/usb/usbaudio.h