diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-10-13 10:10:18 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-22 15:57:19 +0300 |
commit | 4d0197a5cad29ee58593eceac85cbb712430cd89 (patch) | |
tree | 7001c2f25c954932ad13e0804bec826d903cf242 /sound/soc/codecs/wm8903.c | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) | |
download | linux-4d0197a5cad29ee58593eceac85cbb712430cd89.tar.xz |
ASoC: wm8903: harmless underflow in wm8903_put_deemph()
Valid values for "deemph" are zero and one, but we accidentally allow
negative values as well. It's harmless, but static checkers complain
and we may as well clean it up.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index b011253459af..e4cc41e6c23e 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -452,7 +452,7 @@ static int wm8903_put_deemph(struct snd_kcontrol *kcontrol, { struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); - int deemph = ucontrol->value.integer.value[0]; + unsigned int deemph = ucontrol->value.integer.value[0]; int ret = 0; if (deemph > 1) |