milos-linux/sound
Cássio Gabriel f63ad68e18
ASoC: codecs: simple-mux: Fix enum control bounds check
simple_mux_control_put() rejects values greater than e->items, but
enum control values are zero based. For the two-entry mux used by this
driver, valid values are 0 and 1, so value 2 must be rejected as well.

Accepting e->items can store an invalid mux state, pass it to the GPIO
setter, and pass it on to the DAPM mux update path where it is used as
an index into the enum text array.

Use the same >= e->items check used by the ASoC enum helpers.

Fixes: 342fbb7578 ("ASoC: add simple-mux")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260527-asoc-simple-mux-enum-bounds-v1-1-3f805b9fc671@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-27 13:43:20 +01:00
..
ac97 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
aoa ALSA: aoa: onyx: Update IEC958 sample-rate status for PCM playback 2026-04-06 10:41:00 +02:00
arm ASoC: pxa2xx-ac97: fix error handling for reset GPIO descriptor 2026-04-13 18:00:34 +01:00
atmel
core ALSA: seq: Serialize UMP output teardown with event_input 2026-05-20 13:10:40 +02:00
drivers ALSA: pcmtest: Return -EFAULT on pattern read copy failure 2026-05-04 13:26:23 +02:00
firewire ALSA: firewire-tascam: Do not drop unread control events 2026-05-04 17:47:06 +02:00
hda ALSA: hda/realtek: Add LED quirk for HP ProBook 430 G6 2026-05-20 07:51:06 +02:00
i2c ALSA: i2c: ak4xxx-adda: seed AK5365 cache with reset defaults 2026-04-09 12:01:01 +02:00
isa ALSA: sscape: Add suspend and resume support 2026-04-12 10:00:34 +02:00
mips Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
oss ALSA: echoaudio: Add SPDX ids to some files 2026-02-18 08:57:38 +01:00
parisc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci ALSA: asihpi: Fix potential OOB array access at reading cache 2026-05-16 15:41:58 +02:00
pcmcia Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ppc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sh Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
soc ASoC: codecs: simple-mux: Fix enum control bounds check 2026-05-27 13:43:20 +01:00
sparc ALSA: sparc/dbri: add missing fallthrough 2026-05-06 10:09:17 +02:00
spi
synth Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
usb ALSA: scarlett2: Allow flash writes ending at segment boundary 2026-05-20 07:51:46 +02:00
virtio ALSA: virtio: drop an extaneous kernel-doc comment 2026-04-17 09:47:54 +02:00
x86 ASoC: Add SPDX ids to many soc files 2026-02-22 23:52:20 +00:00
xen Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00