From: Takashi Iwai Date: Thu, 27 Nov 2008 14:25:34 +0000 (+0100) Subject: ALSA: hda - Fix creation of automatic capture mixers X-Git-Tag: v2.6.29-rc1~590^2~6^2~35 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=30d72e9f614e7bd76e28d4d92bd54d90a96905bb;p=linux-2.6-omap-h63xx.git ALSA: hda - Fix creation of automatic capture mixers Fixed a wrong boundary check of num_adc_nids in set_capture_mixer() in patch_realtek.c. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4afa0c9b9b6..9cd2545d988 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4269,7 +4269,7 @@ static void set_capture_mixer(struct alc_spec *spec) alc_capture_mixer2, alc_capture_mixer3, }; - if (spec->num_adc_nids > 0 && spec->num_adc_nids < 3) + if (spec->num_adc_nids > 0 && spec->num_adc_nids <= 3) spec->cap_mixer = caps[spec->num_adc_nids - 1]; }