diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 982261e064ca0dbce2edee1b1d31c0dd112d0d72..f24f7354f46fe7ce48ae99ed521bec0891fedad1 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -880,6 +880,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;