aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/mixart/mixart.c4
-rw-r--r--sound/pci/pcxhr/pcxhr.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index 2d0dce649a64..fd9a117f37a4 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 *
1010 .dev_free = snd_mixart_chip_dev_free, 1010 .dev_free = snd_mixart_chip_dev_free,
1011 }; 1011 };
1012 1012
1013 mgr->chip[idx] = chip = kzalloc(sizeof(*chip), GFP_KERNEL); 1013 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
1014 if (! chip) { 1014 if (! chip) {
1015 snd_printk(KERN_ERR "cannot allocate chip\n"); 1015 snd_printk(KERN_ERR "cannot allocate chip\n");
1016 return -ENOMEM; 1016 return -ENOMEM;
@@ -1025,6 +1025,7 @@ static int __devinit snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *
1025 return err; 1025 return err;
1026 } 1026 }
1027 1027
1028 mgr->chip[idx] = chip;
1028 snd_card_set_dev(card, &mgr->pci->dev); 1029 snd_card_set_dev(card, &mgr->pci->dev);
1029 1030
1030 return 0; 1031 return 0;
@@ -1378,6 +1379,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
1378 sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i); 1379 sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i);
1379 1380
1380 if ((err = snd_mixart_create(mgr, card, i)) < 0) { 1381 if ((err = snd_mixart_create(mgr, card, i)) < 0) {
1382 snd_card_free(card);
1381 snd_mixart_free(mgr); 1383 snd_mixart_free(mgr);
1382 return err; 1384 return err;
1383 } 1385 }
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index 0e06c6c9fcc0..58621206a2b3 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -1024,7 +1024,7 @@ static int __devinit pcxhr_create(struct pcxhr_mgr *mgr, struct snd_card *card,
1024 .dev_free = pcxhr_chip_dev_free, 1024 .dev_free = pcxhr_chip_dev_free,
1025 }; 1025 };
1026 1026
1027 mgr->chip[idx] = chip = kzalloc(sizeof(*chip), GFP_KERNEL); 1027 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
1028 if (! chip) { 1028 if (! chip) {
1029 snd_printk(KERN_ERR "cannot allocate chip\n"); 1029 snd_printk(KERN_ERR "cannot allocate chip\n");
1030 return -ENOMEM; 1030 return -ENOMEM;
@@ -1050,6 +1050,7 @@ static int __devinit pcxhr_create(struct pcxhr_mgr *mgr, struct snd_card *card,
1050 return err; 1050 return err;
1051 } 1051 }
1052 1052
1053 mgr->chip[idx] = chip;
1053 snd_card_set_dev(card, &mgr->pci->dev); 1054 snd_card_set_dev(card, &mgr->pci->dev);
1054 1055
1055 return 0; 1056 return 0;
@@ -1307,6 +1308,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
1307 sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i); 1308 sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i);
1308 1309
1309 if ((err = pcxhr_create(mgr, card, i)) < 0) { 1310 if ((err = pcxhr_create(mgr, card, i)) < 0) {
1311 snd_card_free(card);
1310 pcxhr_free(mgr); 1312 pcxhr_free(mgr);
1311 return err; 1313 return err;
1312 } 1314 }