浏览代码

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 <tiwai@suse.de>
Takashi Iwai 16 年之前
父节点
当前提交
30d72e9f61
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      sound/pci/hda/patch_realtek.c

+ 1 - 1
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];
 }