summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-10-13 10:12:45 +0300
committerMark Brown <broonie@kernel.org>2015-10-22 13:59:11 +0100
commit8444f59fd7bd8aa079609e575c0688669b85bfcc (patch)
tree2bea044d2850a0b0cf69c2c0b2cdf9e0eb37201f /sound
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff)
downloadop-kernel-dev-8444f59fd7bd8aa079609e575c0688669b85bfcc.zip
op-kernel-dev-8444f59fd7bd8aa079609e575c0688669b85bfcc.tar.gz
ASoC: wm2000: a couple harmless underflows
We want these to be zero or one, but by mistake we also accept negative values. It's harmless but we should still 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')
-rw-r--r--sound/soc/codecs/wm2000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 786abd0..a67ea10 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -620,7 +620,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
{
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
- int anc_active = ucontrol->value.integer.value[0];
+ unsigned int anc_active = ucontrol->value.integer.value[0];
int ret;
if (anc_active > 1)
@@ -653,7 +653,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
{
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
- int val = ucontrol->value.integer.value[0];
+ unsigned int val = ucontrol->value.integer.value[0];
int ret;
if (val > 1)
OpenPOWER on IntegriCloud