diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-11-15 15:54:38 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 17:29:24 +0100 |
commit | 68ea7b2f2d8c1effd662fded04e9a589cb640da6 (patch) | |
tree | e104282748345692c2a71572a260bf926501ebde /sound/pci/hda/patch_conexant.c | |
parent | 7e39e2273a9b8182ed1b21af5444e29843fc06ca (diff) | |
download | kernel-crypto-68ea7b2f2d8c1effd662fded04e9a589cb640da6.tar.gz kernel-crypto-68ea7b2f2d8c1effd662fded04e9a589cb640da6.tar.xz kernel-crypto-68ea7b2f2d8c1effd662fded04e9a589cb640da6.zip |
[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.c | 2 |
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) |