diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 81c9ecfa7c7f..b734bf911470 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -450,7 +450,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;