Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Mark Brown
8444f59f 6ff33f39

+2 -2
+2 -2
sound/soc/codecs/wm2000.c
··· 620 620 { 621 621 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 622 622 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); 623 - int anc_active = ucontrol->value.integer.value[0]; 623 + unsigned int anc_active = ucontrol->value.integer.value[0]; 624 624 int ret; 625 625 626 626 if (anc_active > 1) ··· 653 653 { 654 654 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 655 655 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); 656 - int val = ucontrol->value.integer.value[0]; 656 + unsigned int val = ucontrol->value.integer.value[0]; 657 657 int ret; 658 658 659 659 if (val > 1)