aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/p16v.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/p16v.c')
-rw-r--r--sound/pci/emu10k1/p16v.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index d619a3842cdd..9fd3135f3118 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -742,6 +742,8 @@ static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol,
742 u32 source; 742 u32 source;
743 743
744 val = ucontrol->value.enumerated.item[0] ; 744 val = ucontrol->value.enumerated.item[0] ;
745 if (val > 7)
746 return -EINVAL;
745 change = (emu->p16v_capture_source != val); 747 change = (emu->p16v_capture_source != val);
746 if (change) { 748 if (change) {
747 emu->p16v_capture_source = val; 749 emu->p16v_capture_source = val;
@@ -784,6 +786,8 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
784 u32 tmp; 786 u32 tmp;
785 787
786 val = ucontrol->value.enumerated.item[0] ; 788 val = ucontrol->value.enumerated.item[0] ;
789 if (val > 3)
790 return -EINVAL;
787 change = (emu->p16v_capture_channel != val); 791 change = (emu->p16v_capture_channel != val);
788 if (change) { 792 if (change) {
789 emu->p16v_capture_channel = val; 793 emu->p16v_capture_channel = val;