Skip to content
Commit 95b4d409 authored by Mark Brown's avatar Mark Brown Committed by Greg Kroah-Hartman
Browse files

ASoC: meson: g12a-toacodec: Validate written enum values

[ Upstream commit 3150b70e ]

When writing to an enum we need to verify that the value written is valid
for the enumeration, the helper function snd_soc_item_enum_to_val() doesn't
do it since it needs to return an unsigned (and in any case we'd need to
check the return value).

Fixes: af2618a2

 ("ASoC: meson: g12a: add internal DAC glue driver")
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240103-meson-enum-val-v1-1-424af7a8fb91@kernel.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2f3b6e86
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