浏览代码

[ALSA] ali5451 - Don't build non-existing modem PCM

ALI5451 driver
Don't build the modem PCM if the corresponding codec isn't detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 19 年之前
父节点
当前提交
4d060fd169
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      sound/pci/ali5451/ali5451.c

+ 4 - 2
sound/pci/ali5451/ali5451.c

@@ -1993,8 +1993,10 @@ static int __devinit snd_ali_mixer(ali_t * codec)
 		if ((err = snd_ac97_mixer(codec->ac97_bus, &ac97, &codec->ac97[i])) < 0) {
 			snd_printk("ali mixer %d creating error.\n", i);
 			if(i == 0)
-		return err;
-	}
+				return err;
+			codec->num_of_codecs = 1;
+			break;
+		}
 	}
 
 	if (codec->spdif_support) {