diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-11-15 09:54:38 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:29:24 -0500 |
commit | 68ea7b2f2d8c1effd662fded04e9a589cb640da6 (patch) | |
tree | e104282748345692c2a71572a260bf926501ebde /sound/pci/hda/patch_conexant.c | |
parent | 7e39e2273a9b8182ed1b21af5444e29843fc06ca (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.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 beda2978147d..68f23b823e25 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, | |||
373 | hda_nid_t nid = kcontrol->private_value & 0xff; | 373 | hda_nid_t nid = kcontrol->private_value & 0xff; |
374 | unsigned int eapd; | 374 | unsigned int eapd; |
375 | 375 | ||
376 | eapd = ucontrol->value.integer.value[0]; | 376 | eapd = !!ucontrol->value.integer.value[0]; |
377 | if (invert) | 377 | if (invert) |
378 | eapd = !eapd; | 378 | eapd = !eapd; |
379 | if (eapd == spec->cur_eapd) | 379 | if (eapd == spec->cur_eapd) |