mirror-linux/sound/soc
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
..
adi
amd ASoC: amd: acp: Add DMI quirk for ASUS Zenbook S16 UM5606GA 2026-05-16 11:28:57 +09:00
apple ASoC: apple: name back to pcm_new()/pcm_free() 2026-03-16 13:37:43 +00:00
atmel ASoC: atmel: name back to pcm_new()/pcm_free() 2026-03-16 13:37:44 +00:00
au1x ASoC: au1x: name back to pcm_new()/pcm_free() 2026-03-16 13:37:45 +00:00
bcm ASoC: bcm: name back to pcm_new()/pcm_free() 2026-03-16 13:37:46 +00:00
cirrus ASoC: ep93xx: Fix unchecked clk_prepare_enable() and add rollback on failure 2026-03-30 19:38:22 +01:00
codecs ASoC: codecs: simple-mux: Fix enum control bounds check 2026-05-27 13:43:20 +01:00
dwc ASoC: dwc: name back to pcm_new()/pcm_free() 2026-03-16 13:37:49 +00:00
fsl ASoC: fsl_sai: Eliminate possible interrupt storm during probe 2026-05-18 17:37:16 +01:00
generic ASoC: generic: keep fallback dai_name stable across rebind 2026-03-30 20:06:54 +01:00
google ASoC: google: name back to pcm_new()/pcm_free() 2026-03-16 13:37:52 +00:00
hisilicon
img
intel ASoC: Intel: bytcht_es8316: Fix MCLK leak on init errors 2026-05-25 13:33:23 +01:00
jz4740
kirkwood ASoC: kirkwood: name back to pcm_new()/pcm_free() 2026-03-16 13:37:54 +00:00
loongson ASoC: loongson: name back to pcm_new()/pcm_free() 2026-03-16 13:37:55 +00:00
mediatek ASoC: mediatek: name back to pcm_new()/pcm_free() 2026-03-16 13:37:56 +00:00
meson
mxs ASoC: mxs-sgtl5000: disable MCLK on error paths of mxs_sgtl5000_probe() 2026-04-01 14:01:25 +01:00
pxa ASoC: pxa: name back to pcm_new()/pcm_free() 2026-03-16 13:37:56 +00:00
qcom ASoC: qcom: q6asm-dai: use pointer type with kzalloc_obj() 2026-05-25 13:46:47 +01:00
renesas ASoC: rsnd: Fix potential out-of-bounds access of component_dais[] 2026-04-03 13:37:20 +01:00
rockchip ASoC: rockchip: rockchip_sai: Set slot width for non-TDM mode 2026-03-25 16:58:24 +00:00
samsung ASoC: samsung: spdif: Convert to devm_ioremap_resource() 2026-03-30 19:37:21 +01:00
sdca ASoC: Correct bug parsing DisCo booleans 2026-04-20 18:40:07 +01:00
sdw_utils ASoC: sdw_utils: Check speaker component string allocation 2026-05-14 09:49:31 +09:00
sof ASoC: SOF: amd: Fix error code handling in psp_send_cmd() 2026-05-12 10:14:33 +09:00
sophgo
spacemit ASoC: spacemit: fix RX DMA params not set when TX is running 2026-05-04 22:02:50 +09:00
spear
sprd ASoC: sprd: name back to pcm_new()/pcm_free() 2026-03-16 13:38:02 +00:00
starfive
sti
stm ASoC: Yet another round of SDCA fixes 2026-04-09 19:39:32 +01:00
sunxi ASoC: sun4i-spdif: Make reset control non-optional and check for all errors 2026-03-24 00:11:20 +00:00
tegra ASoC: tegra: Remove stale snd-soc-tegra-utils composite module definition 2026-04-27 08:23:21 +09:00
ti ASoC: ti: omap-dmic: Fix IS_ERR() vs NULL check bug in omap_dmic_select_fclk() 2026-05-15 10:53:56 +09:00
uniphier ASoC: uniphier: name back to pcm_new()/pcm_free() 2026-03-16 13:38:05 +00:00
ux500
xilinx ASoC: xilinx: name back to pcm_new()/pcm_free() 2026-03-16 13:38:06 +00:00
xtensa ASoC: xtensa: name back to pcm_new()/pcm_free() 2026-03-16 13:38:07 +00:00
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card-test.c
soc-card.c
soc-component.c ASoC: soc-component: add snd_soc_component_regmap_val_bytes() 2026-03-20 12:55:59 +00:00
soc-compress.c
soc-core.c Linux 7.0-rc7 2026-04-07 15:43:29 +01:00
soc-dai.c ASoC: soc-dai: add common operation to set TDM idle mode 2026-03-16 01:13:03 +00:00
soc-dapm.c ASoC: dapm: Add a named controls variant of a mux widget 2026-03-16 18:45:28 +00:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: soc-generic-dmaengine-pcm: name back to pcm_new()/pcm_free() 2026-03-16 13:38:00 +00:00
soc-jack.c
soc-link.c
soc-ops-test.c
soc-ops.c ASoC: soc-component: add snd_soc_component_regmap_val_bytes() 2026-03-20 12:55:59 +00:00
soc-pcm.c
soc-topology-test.c
soc-topology.c ASoC: soc-topology: fix __le32 conversion in printed values 2026-03-23 19:32:16 +00:00
soc-usb.c
soc-utils-test.c
soc-utils.c ASoC: soc-utils: Add missing va_end in snd_soc_ret() 2026-05-19 15:57:03 +01:00