diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-24 00:35:35 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-24 00:35:35 +0100 |
commit | dec14f8c0eff54549e5747f8a4d1dc6c0347e2dd (patch) | |
tree | af1744c17c4bacad4c9524ad096d5a65f6c25c73 /sound/drivers | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) | |
parent | b1a0aac05f044e78a589bfd7a9e2334aa640eb45 (diff) |
Merge branch 'topic/snd_card_new-err' into for-linus
Diffstat (limited to 'sound/drivers')
-rw-r--r-- | sound/drivers/dummy.c | 8 | ||||
-rw-r--r-- | sound/drivers/ml403-ac97cr.c | 6 | ||||
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 6 | ||||
-rw-r--r-- | sound/drivers/mtpav.c | 6 | ||||
-rw-r--r-- | sound/drivers/mts64.c | 6 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp.c | 6 | ||||
-rw-r--r-- | sound/drivers/portman2x4.c | 6 | ||||
-rw-r--r-- | sound/drivers/serial-u16550.c | 6 | ||||
-rw-r--r-- | sound/drivers/virmidi.c | 8 |
9 files changed, 29 insertions, 29 deletions
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 73be7e14a60..54239d2e099 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -588,10 +588,10 @@ static int __devinit snd_dummy_probe(struct platform_device *devptr) int idx, err; int dev = devptr->id; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, - sizeof(struct snd_dummy)); - if (card == NULL) - return -ENOMEM; + err = snd_card_create(index[dev], id[dev], THIS_MODULE, + sizeof(struct snd_dummy), &card); + if (err < 0) + return err; dummy = card->private_data; dummy->card = card; for (idx = 0; idx < MAX_PCM_DEVICES && idx < pcm_devs[dev]; idx++) { diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c index 7783843ca9a..1950ffce2b5 100644 --- a/sound/drivers/ml403-ac97cr.c +++ b/sound/drivers/ml403-ac97cr.c @@ -1279,9 +1279,9 @@ static int __devinit snd_ml403_ac97cr_probe(struct platform_device *pfdev) if (!enable[dev]) return -ENOENT; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); - if (card == NULL) - return -ENOMEM; + err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + if (err < 0) + return err; err = snd_ml403_ac97cr_create(card, pfdev, &ml403_ac97cr); if (err < 0) { PDEBUG(INIT_FAILURE, "probe(): create failed!\n"); diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 5b996f3faba..149d05a8202 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -73,9 +73,9 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) snd_printk(KERN_ERR "the uart_enter option is obsolete; remove it\n"); *rcard = NULL; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); - if (card == NULL) - return -ENOMEM; + err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + if (err < 0) + return err; strcpy(card->driver, "MPU-401 UART"); strcpy(card->shortname, card->driver); sprintf(card->longname, "%s at %#lx, ", card->shortname, port[dev]); diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index 48b64e6b267..0e17d2b5ce1 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c @@ -696,9 +696,9 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) int err; struct mtpav *mtp_card; - card = snd_card_new(index, id, THIS_MODULE, sizeof(*mtp_card)); - if (! card) - return -ENOMEM; + err = snd_card_create(index, id, THIS_MODULE, sizeof(*mtp_card), &card); + if (err < 0) + return err; mtp_card = card->private_data; spin_lock_init(&mtp_card->spinlock); diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index 87ba1ddc011..33d9db782e0 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c @@ -957,10 +957,10 @@ static int __devinit snd_mts64_probe(struct platform_device *pdev) if ((err = snd_mts64_probe_port(p)) < 0) return err; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); - if (card == NULL) { + err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + if (err < 0) { snd_printd("Cannot create card\n"); - return -ENOMEM; + return err; } strcpy(card->driver, DRIVER_NAME); strcpy(card->shortname, "ESI " CARD_NAME); diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c index a4049eb94d3..aa2ae07a76d 100644 --- a/sound/drivers/pcsp/pcsp.c +++ b/sound/drivers/pcsp/pcsp.c @@ -98,9 +98,9 @@ static int __devinit snd_card_pcsp_probe(int devnum, struct device *dev) hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); pcsp_chip.timer.function = pcsp_do_timer; - card = snd_card_new(index, id, THIS_MODULE, 0); - if (!card) - return -ENOMEM; + err = snd_card_create(index, id, THIS_MODULE, 0, &card); + if (err < 0) + return err; err = snd_pcsp_create(card); if (err < 0) { diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index b1c047ec19a..60158e2e0ea 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c @@ -746,10 +746,10 @@ static int __devinit snd_portman_probe(struct platform_device *pdev) if ((err = snd_portman_probe_port(p)) < 0) return err; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); - if (card == NULL) { + err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + if (err < 0) { snd_printd("Cannot create card\n"); - return -ENOMEM; + return err; } strcpy(card->driver, DRIVER_NAME); strcpy(card->shortname, CARD_NAME); diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index d8aab9da97c..891d081e482 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c @@ -936,9 +936,9 @@ static int __devinit snd_serial_probe(struct platform_device *devptr) return -ENODEV; } - card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); - if (card == NULL) - return -ENOMEM; + err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + if (err < 0) + return err; strcpy(card->driver, "Serial"); strcpy(card->shortname, "Serial MIDI (UART16550A)"); diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index f79e3614079..6f48711818f 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c @@ -90,10 +90,10 @@ static int __devinit snd_virmidi_probe(struct platform_device *devptr) int idx, err; int dev = devptr->id; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, - sizeof(struct snd_card_virmidi)); - if (card == NULL) - return -ENOMEM; + err = snd_card_create(index[dev], id[dev], THIS_MODULE, + sizeof(struct snd_card_virmidi), &card); + if (err < 0) + return err; vmidi = (struct snd_card_virmidi *)card->private_data; vmidi->card = card; |