aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-10-13 03:08:57 -0400
committerMark Brown <broonie@kernel.org>2015-10-22 08:55:23 -0400
commit523bade22428d4c6742dd7bfb4c0259a23bb9ec3 (patch)
tree84aa6e771e4617a27ecbe6612c56f40bb9349907
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff)
ASoC: wm8731: harmless underflow in wm8731_put_deemph()
The code tries to verify that "deemph" is zero or one, but it fails to account for that it can be negative. It's harmless because negatives are treated the same as one, but we should fix it just to silence the static checker warning. 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/wm8731.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index ace8645245a0..07cf1bd7913a 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -132,7 +132,7 @@ static int wm8731_put_deemph(struct snd_kcontrol *kcontrol,
132{ 132{
133 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 133 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
134 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); 134 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
135 int deemph = ucontrol->value.integer.value[0]; 135 unsigned int deemph = ucontrol->value.integer.value[0];
136 int ret = 0; 136 int ret = 0;
137 137
138 if (deemph > 1) 138 if (deemph > 1)