diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index f4dc3d445aae9e128e2db6f85fac603c943398f1..456116ec1736432c7ae7dc32d183df7b916d7585 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -889,6 +889,8 @@ int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol, unsigned int i, regval, regmask; int err; + if (val < mc->min || val > mc->max) + return -EINVAL; if (invert) val = max - val; val &= mask;