aboutsummaryrefslogtreecommitdiff
path: root/sound/i2c/other
diff options
context:
space:
mode:
Diffstat (limited to 'sound/i2c/other')
-rw-r--r--sound/i2c/other/pt2258.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/i2c/other/pt2258.c b/sound/i2c/other/pt2258.c
index 00c83d8b32b..987d2c9a7a6 100644
--- a/sound/i2c/other/pt2258.c
+++ b/sound/i2c/other/pt2258.c
@@ -113,6 +113,8 @@ static int pt2258_stereo_volume_put(struct snd_kcontrol *kcontrol,
val0 = 79 - ucontrol->value.integer.value[0];
val1 = 79 - ucontrol->value.integer.value[1];
+ if (val0 < 0 || val0 > 79 || val1 < 0 || val1 > 79)
+ return -EINVAL;
if (val0 == pt->volume[base] && val1 == pt->volume[base + 1])
return 0;