diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-12-25 11:40:26 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-12-25 11:40:26 +0100 |
commit | 86b3aa390b4b9925f16a21b98441fd7abdb9fff2 (patch) | |
tree | 9eb9d429a88d2301667198e30842502556b715f2 /sound/pci/mixart | |
parent | e4456e71618ec2c98084c15824d93e997955b60c (diff) | |
parent | ebef7cfc81942686a994ca6239b195040f5d1e4d (diff) |
Merge branch 'topic/ca0106' into to-push
Diffstat (limited to 'sound/pci/mixart')
-rw-r--r-- | sound/pci/mixart/mixart.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index ae7601f353a..f23a73577c2 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -1010,7 +1010,7 @@ static int __devinit snd_mixart_create(struct mixart_mgr *mgr, struct snd_card * .dev_free = snd_mixart_chip_dev_free, }; - mgr->chip[idx] = chip = kzalloc(sizeof(*chip), GFP_KERNEL); + chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (! chip) { snd_printk(KERN_ERR "cannot allocate chip\n"); return -ENOMEM; @@ -1025,6 +1025,7 @@ static int __devinit snd_mixart_create(struct mixart_mgr *mgr, struct snd_card * return err; } + mgr->chip[idx] = chip; snd_card_set_dev(card, &mgr->pci->dev); return 0; @@ -1377,6 +1378,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i); if ((err = snd_mixart_create(mgr, card, i)) < 0) { + snd_card_free(card); snd_mixart_free(mgr); return err; } |