Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff3ed824 authored by Alexander Grund's avatar Alexander Grund
Browse files

ASoC: ops: Shift tested values in snd_soc_put_volsw_sx() by +min

Followup to e41846db:
"ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min"
Adding the same change to snd_soc_put_volsw_sx

Change-Id: Iece6800a9ad9f1a37bbfab6c4dab9a0dc7d16e6d
parent 6f9f8454
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -449,7 +449,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
	unsigned int val, val_mask, val2 = 0;

	val = ucontrol->value.integer.value[0];
	if (mc->platform_max && val > mc->platform_max)
	if (mc->platform_max && ((int)val + min) > mc->platform_max)
		return -EINVAL;
	if (val > max - min)
		return -EINVAL;