From 80c8662762f98e2f55374dff45698e002b90372f Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 19 Feb 2024 18:44:12 +0100 Subject: Revert "ASoC: ops: Fix bounds check for _sx controls" This reverts commit 416f4b76240400260aaf0c4200565d63f49290d7. --- sound/soc/soc-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index dfd7455c9f7a..d867f449d82d 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -435,7 +435,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, val = ucontrol->value.integer.value[0]; if (mc->platform_max && val > mc->platform_max) return -EINVAL; - if (val > max) + if (val > max - min) return -EINVAL; val_mask = mask << shift; val = (val + min) & mask; -- cgit v1.2.3