diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2009-08-24 09:11:58 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-08-24 09:46:08 +0200 |
commit | edd1365e90eb32625041d09de427d7b03461bc5c (patch) | |
tree | d2a204fe649c48560f6d290d6c3cc1fc68af4982 /sound/pci | |
parent | 70bdbd3d1ae9c4ca3e84a43df34262face26575d (diff) | |
download | linux-stable-edd1365e90eb32625041d09de427d7b03461bc5c.tar.gz linux-stable-edd1365e90eb32625041d09de427d7b03461bc5c.tar.bz2 linux-stable-edd1365e90eb32625041d09de427d7b03461bc5c.zip |
sound: vx222: fix input level control range check
Fix a logic error in the range check of the input level control that
would prevent setting any volume less than the maximum.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/vx222/vx222_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c index 6416d3f0c7be..a69e774d0b13 100644 --- a/sound/pci/vx222/vx222_ops.c +++ b/sound/pci/vx222/vx222_ops.c @@ -885,10 +885,10 @@ static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vx222 *chip = (struct snd_vx222 *)_chip; if (ucontrol->value.integer.value[0] < 0 || - ucontrol->value.integer.value[0] < MIC_LEVEL_MAX) + ucontrol->value.integer.value[0] > MIC_LEVEL_MAX) return -EINVAL; if (ucontrol->value.integer.value[1] < 0 || - ucontrol->value.integer.value[1] < MIC_LEVEL_MAX) + ucontrol->value.integer.value[1] > MIC_LEVEL_MAX) return -EINVAL; mutex_lock(&_chip->mixer_mutex); if (chip->input_level[0] != ucontrol->value.integer.value[0] || |