Skip to content

Commit 4d060fd

Browse files
tiwaiJaroslav Kysela
authored andcommitted
[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>
1 parent b150869 commit 4d060fd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎sound/pci/ali5451/ali5451.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,8 +1993,10 @@ static int __devinit snd_ali_mixer(ali_t * codec)
19931993
if ((err = snd_ac97_mixer(codec->ac97_bus, &ac97, &codec->ac97[i])) < 0) {
19941994
snd_printk("ali mixer %d creating error.\n", i);
19951995
if(i == 0)
1996-
return err;
1997-
}
1996+
return err;
1997+
codec->num_of_codecs = 1;
1998+
break;
1999+
}
19982000
}
19992001

20002002
if (codec->spdif_support) {

0 commit comments

Comments
 (0)