summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-09-28 13:06:20 +0300
committerTakashi Iwai <tiwai@suse.de>2015-09-28 15:33:03 +0300
commite87359efcaf45efc41dbaa6ec25eb26705300cee (patch)
tree3b834c58ea97ef808aefabab9109f01664d39dd7
parentb7631a12e726597cffde1b29cc3bcf811981c1fb (diff)
downloadlinux-e87359efcaf45efc41dbaa6ec25eb26705300cee.tar.xz
ALSA: usb-audio: harmless underflow in snd_audigy2nx_led_put()
We want to verify that "value" is either zero or one, so we test if it is greater than one. Unfortunately, this is a signed int so it could also be negative. I think this is harmless but it introduces a static checker warning. Let's make "value" unsigned. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/usb/mixer_quirks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index d3608c0a29f3..fe91184ce832 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -338,7 +338,7 @@ static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol,
struct usb_mixer_elem_list *list = snd_kcontrol_chip(kcontrol);
struct usb_mixer_interface *mixer = list->mixer;
int index = kcontrol->private_value & 0xff;
- int value = ucontrol->value.integer.value[0];
+ unsigned int value = ucontrol->value.integer.value[0];
int old_value = kcontrol->private_value >> 8;
int err;