summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-10-13 10:08:57 +0300
committerMark Brown <broonie@kernel.org>2015-10-22 13:55:23 +0100
commit523bade22428d4c6742dd7bfb4c0259a23bb9ec3 (patch)
tree84aa6e771e4617a27ecbe6612c56f40bb9349907 /sound
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>
Diffstat (limited to 'sound')
-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,
{
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8731_priv *wm8731 = 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)