summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-11-15 15:54:38 +0100
committerJaroslav Kysela <perex@perex.cz>2008-01-31 17:29:24 +0100
commit68ea7b2f2d8c1effd662fded04e9a589cb640da6 (patch)
treee104282748345692c2a71572a260bf926501ebde /sound/pci/hda/patch_conexant.c
parent7e39e2273a9b8182ed1b21af5444e29843fc06ca (diff)
[ALSA] hda-codec - Check value range in ctl callbacks
Check the value ranges in ctl put callbacks properly so that invalid values won't be stored or written to registers. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r--sound/pci/hda/patch_conexant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index beda2978147..68f23b823e2 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -373,7 +373,7 @@ static int cxt_eapd_put(struct snd_kcontrol *kcontrol,
hda_nid_t nid = kcontrol->private_value & 0xff;
unsigned int eapd;
- eapd = ucontrol->value.integer.value[0];
+ eapd = !!ucontrol->value.integer.value[0];
if (invert)
eapd = !eapd;
if (eapd == spec->cur_eapd)