Unverified Commit 70a7fff6 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12836 ASoC: ops: Fix bounds check for _sx controls

parents 43cdd195 fbb5b56c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -432,7 +432,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 - min)
	if (val > max)
		return -EINVAL;
	if (val < 0)
		return -EINVAL;