diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 4fda8c24be29..5479927391d4 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;