]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/sh/aica.c
Merge branch 'topic/snd_card_new-err' into topic/cs423x-merge
[linux-2.6-omap-h63xx.git] / sound / sh / aica.c
index 7c920f3e7fe35e4a917597d92b736011e8a62ba4..f551233c5a08d6958c14caebe24a1e227257e829 100644 (file)
@@ -609,11 +609,11 @@ static int __devinit snd_aica_probe(struct platform_device *devptr)
        dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL);
        if (unlikely(!dreamcastcard))
                return -ENOMEM;
-       dreamcastcard->card =
-           snd_card_new(index, SND_AICA_DRIVER, THIS_MODULE, 0);
-       if (unlikely(!dreamcastcard->card)) {
+       err = snd_card_create(index, SND_AICA_DRIVER, THIS_MODULE, 0,
+                             &dreamcastcard->card);
+       if (unlikely(err < 0)) {
                kfree(dreamcastcard);
-               return -ENODEV;
+               return err;
        }
        strcpy(dreamcastcard->card->driver, "snd_aica");
        strcpy(dreamcastcard->card->shortname, SND_AICA_DRIVER);