aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-10-13 03:10:18 -0400
committerMark Brown <broonie@kernel.org>2015-10-22 08:57:19 -0400
commit4d0197a5cad29ee58593eceac85cbb712430cd89 (patch)
tree7001c2f25c954932ad13e0804bec826d903cf242
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff)
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>
-rw-r--r--sound/soc/codecs/wm8903.c2
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,
452{ 452{
453 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 453 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
454 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); 454 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
455 int deemph = ucontrol->value.integer.value[0]; 455 unsigned int deemph = ucontrol->value.integer.value[0];
456 int ret = 0; 456 int ret = 0;
457 457
458 if (deemph > 1) 458 if (deemph > 1)