Message ID | 20220516193613.806343797@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index e7aef841f87d..4aefb13900c2 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c @@ -419,6 +419,9 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol, val = (val >> mc->shift) & mask; + if (sel < 0 || sel > mc->max) + return -EINVAL; + *select = sel; /* Setting a volume is only valid if it is already On */