]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/pcxhr/pcxhr.c
Merge branch 'topic/pcxhr' into for-linus
[linux-2.6-omap-h63xx.git] / sound / pci / pcxhr / pcxhr.c
index ca89106f8c5da255f1f0562ec2ae66fcb27512fc..80e064a3efff94d1c37c81276d15b7d95c9b5533 100644 (file)
@@ -1551,12 +1551,12 @@ static int __devinit pcxhr_probe(struct pci_dev *pci,
 
                snprintf(tmpid, sizeof(tmpid), "%s-%d",
                         id[dev] ? id[dev] : card_name, i);
-               card = snd_card_new(idx, tmpid, THIS_MODULE, 0);
+               err = snd_card_create(idx, tmpid, THIS_MODULE, 0, &card);
 
-               if (! card) {
+               if (err < 0) {
                        snd_printk(KERN_ERR "cannot allocate the card %d\n", i);
                        pcxhr_free(mgr);
-                       return -ENOMEM;
+                       return err;
                }
 
                strcpy(card->driver, DRIVER_NAME);