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/pcxhr | |
parent | e4456e71618ec2c98084c15824d93e997955b60c (diff) | |
parent | ebef7cfc81942686a994ca6239b195040f5d1e4d (diff) | |
download | talos-op-linux-86b3aa390b4b9925f16a21b98441fd7abdb9fff2.tar.gz talos-op-linux-86b3aa390b4b9925f16a21b98441fd7abdb9fff2.zip |
Merge branch 'topic/ca0106' into to-push
Diffstat (limited to 'sound/pci/pcxhr')
-rw-r--r-- | sound/pci/pcxhr/pcxhr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 73de6e989b3d..7d2b136295d5 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, .dev_free = pcxhr_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; @@ -1050,6 +1050,7 @@ static int __devinit pcxhr_create(struct pcxhr_mgr *mgr, struct snd_card *card, return err; } + mgr->chip[idx] = chip; snd_card_set_dev(card, &mgr->pci->dev); return 0; @@ -1310,6 +1311,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i); if ((err = pcxhr_create(mgr, card, i)) < 0) { + snd_card_free(card); pcxhr_free(mgr); return err; } |