]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: usb-audio: fix broken logic in snd_audigy2nx_led_update()
authorSergey Shtylyov <s.shtylyov@auroraos.dev>
Tue, 3 Feb 2026 16:15:57 +0000 (19:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Feb 2026 12:41:59 +0000 (13:41 +0100)
commit8434b351cd4ea16c8e1857c6f3faa94079b32849
tree618fba0a13fbed972f3696443e74b2da291a8105
parent01d2fb15f15c153f6a9935ab8e6926d9588a9ac6
ALSA: usb-audio: fix broken logic in snd_audigy2nx_led_update()

[ Upstream commit 124bdc6eccc8c5cba68fee00e01c084c116c4360 ]

When the support for the Sound Blaster X-Fi Surround 5.1 Pro was added,
the existing logic for the X-Fi Surround 5.1 in snd_audigy2nx_led_put()
was broken due to missing *else* before the added *if*: snd_usb_ctl_msg()
became incorrectly called twice and an error from first snd_usb_ctl_msg()
call ignored.  As the added snd_usb_ctl_msg() call was totally identical
to the existing one for the "plain" X-Fi Surround 5.1, just merge those
two *if* statements while fixing the broken logic...

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

Fixes: 7cdd8d73139e ("ALSA: usb-audio - Add support for USB X-Fi S51 Pro")
Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
Link: https://patch.msgid.link/20260203161558.18680-1-s.shtylyov@auroraos.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/usb/mixer_quirks.c