aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@alsa3.local>2008-12-28 10:44:30 -0500
committerTakashi Iwai <tiwai@suse.de>2009-01-12 09:20:55 -0500
commite58de7baf7de11f01a675cbbf6ecc8a2758b9ca5 (patch)
treeb0c78267928d5a538b947f1f3f2247e4f63353b0
parentc95eadd2f1afd2ba643e85a8dfc9079a3f03ae47 (diff)
ALSA: Convert to snd_card_create() in sound/pci/*
Convert from snd_card_new() to the new snd_card_create() function in sound/pci/*. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ad1889.c6
-rw-r--r--sound/pci/ali5451/ali5451.c6
-rw-r--r--sound/pci/als300.c6
-rw-r--r--sound/pci/als4000.c9
-rw-r--r--sound/pci/atiixp.c6
-rw-r--r--sound/pci/atiixp_modem.c6
-rw-r--r--sound/pci/au88x0/au88x0.c6
-rw-r--r--sound/pci/aw2/aw2-alsa.c6
-rw-r--r--sound/pci/azt3328.c6
-rw-r--r--sound/pci/bt87x.c6
-rw-r--r--sound/pci/ca0106/ca0106_main.c6
-rw-r--r--sound/pci/cmipci.c6
-rw-r--r--sound/pci/cs4281.c6
-rw-r--r--sound/pci/cs46xx/cs46xx.c6
-rw-r--r--sound/pci/cs5530.c6
-rw-r--r--sound/pci/cs5535audio/cs5535audio.c6
-rw-r--r--sound/pci/echoaudio/echoaudio.c6
-rw-r--r--sound/pci/emu10k1/emu10k1.c6
-rw-r--r--sound/pci/emu10k1/emu10k1x.c6
-rw-r--r--sound/pci/ens1370.c6
-rw-r--r--sound/pci/es1938.c6
-rw-r--r--sound/pci/es1968.c6
-rw-r--r--sound/pci/fm801.c6
-rw-r--r--sound/pci/hda/hda_intel.c6
-rw-r--r--sound/pci/ice1712/ice1712.c6
-rw-r--r--sound/pci/ice1712/ice1724.c6
-rw-r--r--sound/pci/intel8x0.c6
-rw-r--r--sound/pci/intel8x0m.c6
-rw-r--r--sound/pci/korg1212/korg1212.c6
-rw-r--r--sound/pci/maestro3.c6
-rw-r--r--sound/pci/mixart/mixart.c6
-rw-r--r--sound/pci/nm256/nm256.c6
-rw-r--r--sound/pci/oxygen/oxygen_lib.c8
-rw-r--r--sound/pci/pcxhr/pcxhr.c6
-rw-r--r--sound/pci/riptide/riptide.c6
-rw-r--r--sound/pci/rme32.c7
-rw-r--r--sound/pci/rme96.c7
-rw-r--r--sound/pci/rme9652/hdsp.c6
-rw-r--r--sound/pci/rme9652/hdspm.c8
-rw-r--r--sound/pci/rme9652/rme9652.c8
-rw-r--r--sound/pci/sis7019.c5
-rw-r--r--sound/pci/sonicvibes.c6
-rw-r--r--sound/pci/trident/trident.c6
-rw-r--r--sound/pci/via82xx.c6
-rw-r--r--sound/pci/via82xx_modem.c6
-rw-r--r--sound/pci/vx222/vx222.c6
-rw-r--r--sound/pci/ymfpci/ymfpci.c6
47 files changed, 148 insertions, 144 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index a7f38e63303f..d1f242bd0ac5 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -995,10 +995,10 @@ snd_ad1889_probe(struct pci_dev *pci,
995 } 995 }
996 996
997 /* (2) */ 997 /* (2) */
998 card = snd_card_new(index[devno], id[devno], THIS_MODULE, 0); 998 err = snd_card_create(index[devno], id[devno], THIS_MODULE, 0, &card);
999 /* XXX REVISIT: we can probably allocate chip in this call */ 999 /* XXX REVISIT: we can probably allocate chip in this call */
1000 if (card == NULL) 1000 if (err < 0)
1001 return -ENOMEM; 1001 return err;
1002 1002
1003 strcpy(card->driver, "AD1889"); 1003 strcpy(card->driver, "AD1889");
1004 strcpy(card->shortname, "Analog Devices AD1889"); 1004 strcpy(card->shortname, "Analog Devices AD1889");
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 1a0fd65ec280..b36c551da566 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -2307,9 +2307,9 @@ static int __devinit snd_ali_probe(struct pci_dev *pci,
2307 2307
2308 snd_ali_printk("probe ...\n"); 2308 snd_ali_printk("probe ...\n");
2309 2309
2310 card = snd_card_new(index, id, THIS_MODULE, 0); 2310 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
2311 if (!card) 2311 if (err < 0)
2312 return -ENOMEM; 2312 return err;
2313 2313
2314 err = snd_ali_create(card, pci, pcm_channels, spdif, &codec); 2314 err = snd_ali_create(card, pci, pcm_channels, spdif, &codec);
2315 if (err < 0) 2315 if (err < 0)
diff --git a/sound/pci/als300.c b/sound/pci/als300.c
index 8df6824b51cd..f557c155db48 100644
--- a/sound/pci/als300.c
+++ b/sound/pci/als300.c
@@ -812,10 +812,10 @@ static int __devinit snd_als300_probe(struct pci_dev *pci,
812 return -ENOENT; 812 return -ENOENT;
813 } 813 }
814 814
815 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 815 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
816 816
817 if (card == NULL) 817 if (err < 0)
818 return -ENOMEM; 818 return err;
819 819
820 chip_type = pci_id->driver_data; 820 chip_type = pci_id->driver_data;
821 821
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c
index ba570053d4d5..542a0c65a92c 100644
--- a/sound/pci/als4000.c
+++ b/sound/pci/als4000.c
@@ -889,12 +889,13 @@ static int __devinit snd_card_als4000_probe(struct pci_dev *pci,
889 pci_write_config_word(pci, PCI_COMMAND, word | PCI_COMMAND_IO); 889 pci_write_config_word(pci, PCI_COMMAND, word | PCI_COMMAND_IO);
890 pci_set_master(pci); 890 pci_set_master(pci);
891 891
892 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 892 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
893 sizeof(*acard) /* private_data: acard */); 893 sizeof(*acard) /* private_data: acard */,
894 if (card == NULL) { 894 &card);
895 if (err < 0) {
895 pci_release_regions(pci); 896 pci_release_regions(pci);
896 pci_disable_device(pci); 897 pci_disable_device(pci);
897 return -ENOMEM; 898 return err;
898 } 899 }
899 900
900 acard = card->private_data; 901 acard = card->private_data;
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 226fe8237d31..9ce8548c03e4 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1645,9 +1645,9 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
1645 struct atiixp *chip; 1645 struct atiixp *chip;
1646 int err; 1646 int err;
1647 1647
1648 card = snd_card_new(index, id, THIS_MODULE, 0); 1648 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
1649 if (card == NULL) 1649 if (err < 0)
1650 return -ENOMEM; 1650 return err;
1651 1651
1652 strcpy(card->driver, spdif_aclink ? "ATIIXP" : "ATIIXP-SPDMA"); 1652 strcpy(card->driver, spdif_aclink ? "ATIIXP" : "ATIIXP-SPDMA");
1653 strcpy(card->shortname, "ATI IXP"); 1653 strcpy(card->shortname, "ATI IXP");
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 0e6e5cc1c501..c3136cccc559 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -1288,9 +1288,9 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
1288 struct atiixp_modem *chip; 1288 struct atiixp_modem *chip;
1289 int err; 1289 int err;
1290 1290
1291 card = snd_card_new(index, id, THIS_MODULE, 0); 1291 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
1292 if (card == NULL) 1292 if (err < 0)
1293 return -ENOMEM; 1293 return err;
1294 1294
1295 strcpy(card->driver, "ATIIXP-MODEM"); 1295 strcpy(card->driver, "ATIIXP-MODEM");
1296 strcpy(card->shortname, "ATI IXP Modem"); 1296 strcpy(card->shortname, "ATI IXP Modem");
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index a36d4d1fd419..9ec122383eef 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -250,9 +250,9 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
250 return -ENOENT; 250 return -ENOENT;
251 } 251 }
252 // (2) 252 // (2)
253 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 253 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
254 if (card == NULL) 254 if (err < 0)
255 return -ENOMEM; 255 return err;
256 256
257 // (3) 257 // (3)
258 if ((err = snd_vortex_create(card, pci, &chip)) < 0) { 258 if ((err = snd_vortex_create(card, pci, &chip)) < 0) {
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
index 3f00ddf450f8..eefcbf648ee1 100644
--- a/sound/pci/aw2/aw2-alsa.c
+++ b/sound/pci/aw2/aw2-alsa.c
@@ -368,9 +368,9 @@ static int __devinit snd_aw2_probe(struct pci_dev *pci,
368 } 368 }
369 369
370 /* (2) Create card instance */ 370 /* (2) Create card instance */
371 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 371 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
372 if (card == NULL) 372 if (err < 0)
373 return -ENOMEM; 373 return err;
374 374
375 /* (3) Create main component */ 375 /* (3) Create main component */
376 err = snd_aw2_create(card, pci, &chip); 376 err = snd_aw2_create(card, pci, &chip);
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
index 333007c523a1..1df96e76c483 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -2216,9 +2216,9 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
2216 return -ENOENT; 2216 return -ENOENT;
2217 } 2217 }
2218 2218
2219 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2219 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2220 if (card == NULL) 2220 if (err < 0)
2221 return -ENOMEM; 2221 return err;
2222 2222
2223 strcpy(card->driver, "AZF3328"); 2223 strcpy(card->driver, "AZF3328");
2224 strcpy(card->shortname, "Aztech AZF3328 (PCI168)"); 2224 strcpy(card->shortname, "Aztech AZF3328 (PCI168)");
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 1aa1c0402540..a299340519df 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -888,9 +888,9 @@ static int __devinit snd_bt87x_probe(struct pci_dev *pci,
888 return -ENOENT; 888 return -ENOENT;
889 } 889 }
890 890
891 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 891 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
892 if (!card) 892 if (err < 0)
893 return -ENOMEM; 893 return err;
894 894
895 err = snd_bt87x_create(card, pci, &chip); 895 err = snd_bt87x_create(card, pci, &chip);
896 if (err < 0) 896 if (err < 0)
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 0e62205d4081..b116456e7707 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1707,9 +1707,9 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
1707 return -ENOENT; 1707 return -ENOENT;
1708 } 1708 }
1709 1709
1710 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 1710 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
1711 if (card == NULL) 1711 if (err < 0)
1712 return -ENOMEM; 1712 return err;
1713 1713
1714 err = snd_ca0106_create(dev, card, pci, &chip); 1714 err = snd_ca0106_create(dev, card, pci, &chip);
1715 if (err < 0) 1715 if (err < 0)
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index 1a74ca62c314..c7899c32aba1 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -3272,9 +3272,9 @@ static int __devinit snd_cmipci_probe(struct pci_dev *pci,
3272 return -ENOENT; 3272 return -ENOENT;
3273 } 3273 }
3274 3274
3275 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 3275 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
3276 if (card == NULL) 3276 if (err < 0)
3277 return -ENOMEM; 3277 return err;
3278 3278
3279 switch (pci->device) { 3279 switch (pci->device) {
3280 case PCI_DEVICE_ID_CMEDIA_CM8738: 3280 case PCI_DEVICE_ID_CMEDIA_CM8738:
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index 192e7842e181..b9b07f464631 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -1925,9 +1925,9 @@ static int __devinit snd_cs4281_probe(struct pci_dev *pci,
1925 return -ENOENT; 1925 return -ENOENT;
1926 } 1926 }
1927 1927
1928 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 1928 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
1929 if (card == NULL) 1929 if (err < 0)
1930 return -ENOMEM; 1930 return err;
1931 1931
1932 if ((err = snd_cs4281_create(card, pci, &chip, dual_codec[dev])) < 0) { 1932 if ((err = snd_cs4281_create(card, pci, &chip, dual_codec[dev])) < 0) {
1933 snd_card_free(card); 1933 snd_card_free(card);
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c
index e876b3263e46..c9b3e3d48cbc 100644
--- a/sound/pci/cs46xx/cs46xx.c
+++ b/sound/pci/cs46xx/cs46xx.c
@@ -88,9 +88,9 @@ static int __devinit snd_card_cs46xx_probe(struct pci_dev *pci,
88 return -ENOENT; 88 return -ENOENT;
89 } 89 }
90 90
91 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 91 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
92 if (card == NULL) 92 if (err < 0)
93 return -ENOMEM; 93 return err;
94 if ((err = snd_cs46xx_create(card, pci, 94 if ((err = snd_cs46xx_create(card, pci,
95 external_amp[dev], thinkpad[dev], 95 external_amp[dev], thinkpad[dev],
96 &chip)) < 0) { 96 &chip)) < 0) {
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c
index 6dea5b5cc774..dc464321d0f3 100644
--- a/sound/pci/cs5530.c
+++ b/sound/pci/cs5530.c
@@ -258,10 +258,10 @@ static int __devinit snd_cs5530_probe(struct pci_dev *pci,
258 return -ENOENT; 258 return -ENOENT;
259 } 259 }
260 260
261 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 261 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
262 262
263 if (card == NULL) 263 if (err < 0)
264 return -ENOMEM; 264 return err;
265 265
266 err = snd_cs5530_create(card, pci, &chip); 266 err = snd_cs5530_create(card, pci, &chip);
267 if (err < 0) { 267 if (err < 0) {
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
index 826e6dec2e97..ac1d72e0a1e4 100644
--- a/sound/pci/cs5535audio/cs5535audio.c
+++ b/sound/pci/cs5535audio/cs5535audio.c
@@ -353,9 +353,9 @@ static int __devinit snd_cs5535audio_probe(struct pci_dev *pci,
353 return -ENOENT; 353 return -ENOENT;
354 } 354 }
355 355
356 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 356 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
357 if (card == NULL) 357 if (err < 0)
358 return -ENOMEM; 358 return err;
359 359
360 if ((err = snd_cs5535audio_create(card, pci, &cs5535au)) < 0) 360 if ((err = snd_cs5535audio_create(card, pci, &cs5535au)) < 0)
361 goto probefail_out; 361 goto probefail_out;
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 8dbc5c4ba421..9d015a76eb69 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -1997,9 +1997,9 @@ static int __devinit snd_echo_probe(struct pci_dev *pci,
1997 1997
1998 DE_INIT(("Echoaudio driver starting...\n")); 1998 DE_INIT(("Echoaudio driver starting...\n"));
1999 i = 0; 1999 i = 0;
2000 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2000 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2001 if (card == NULL) 2001 if (err < 0)
2002 return -ENOMEM; 2002 return err;
2003 2003
2004 snd_card_set_dev(card, &pci->dev); 2004 snd_card_set_dev(card, &pci->dev);
2005 2005
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
index 8354c1a83312..c7f3b994101c 100644
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -114,9 +114,9 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
114 return -ENOENT; 114 return -ENOENT;
115 } 115 }
116 116
117 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 117 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
118 if (card == NULL) 118 if (err < 0)
119 return -ENOMEM; 119 return err;
120 if (max_buffer_size[dev] < 32) 120 if (max_buffer_size[dev] < 32)
121 max_buffer_size[dev] = 32; 121 max_buffer_size[dev] = 32;
122 else if (max_buffer_size[dev] > 1024) 122 else if (max_buffer_size[dev] > 1024)
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 5ff4dbb62dad..31542adc6b7e 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -1544,9 +1544,9 @@ static int __devinit snd_emu10k1x_probe(struct pci_dev *pci,
1544 return -ENOENT; 1544 return -ENOENT;
1545 } 1545 }
1546 1546
1547 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 1547 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
1548 if (card == NULL) 1548 if (err < 0)
1549 return -ENOMEM; 1549 return err;
1550 1550
1551 if ((err = snd_emu10k1x_create(card, pci, &chip)) < 0) { 1551 if ((err = snd_emu10k1x_create(card, pci, &chip)) < 0) {
1552 snd_card_free(card); 1552 snd_card_free(card);
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c
index 9bf95367c882..e00614cbceff 100644
--- a/sound/pci/ens1370.c
+++ b/sound/pci/ens1370.c
@@ -2409,9 +2409,9 @@ static int __devinit snd_audiopci_probe(struct pci_dev *pci,
2409 return -ENOENT; 2409 return -ENOENT;
2410 } 2410 }
2411 2411
2412 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2412 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2413 if (card == NULL) 2413 if (err < 0)
2414 return -ENOMEM; 2414 return err;
2415 2415
2416 if ((err = snd_ensoniq_create(card, pci, &ensoniq)) < 0) { 2416 if ((err = snd_ensoniq_create(card, pci, &ensoniq)) < 0) {
2417 snd_card_free(card); 2417 snd_card_free(card);
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index 4cd9a1faaecc..34a78afc26d0 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -1799,9 +1799,9 @@ static int __devinit snd_es1938_probe(struct pci_dev *pci,
1799 return -ENOENT; 1799 return -ENOENT;
1800 } 1800 }
1801 1801
1802 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 1802 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
1803 if (card == NULL) 1803 if (err < 0)
1804 return -ENOMEM; 1804 return err;
1805 for (idx = 0; idx < 5; idx++) { 1805 for (idx = 0; idx < 5; idx++) {
1806 if (pci_resource_start(pci, idx) == 0 || 1806 if (pci_resource_start(pci, idx) == 0 ||
1807 !(pci_resource_flags(pci, idx) & IORESOURCE_IO)) { 1807 !(pci_resource_flags(pci, idx) & IORESOURCE_IO)) {
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index e9c3794bbcb8..dc97e8116141 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -2645,9 +2645,9 @@ static int __devinit snd_es1968_probe(struct pci_dev *pci,
2645 return -ENOENT; 2645 return -ENOENT;
2646 } 2646 }
2647 2647
2648 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2648 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2649 if (!card) 2649 if (err < 0)
2650 return -ENOMEM; 2650 return err;
2651 2651
2652 if (total_bufsize[dev] < 128) 2652 if (total_bufsize[dev] < 128)
2653 total_bufsize[dev] = 128; 2653 total_bufsize[dev] = 128;
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index c129f9e2072c..60cdb9e0b68d 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1468,9 +1468,9 @@ static int __devinit snd_card_fm801_probe(struct pci_dev *pci,
1468 return -ENOENT; 1468 return -ENOENT;
1469 } 1469 }
1470 1470
1471 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 1471 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
1472 if (card == NULL) 1472 if (err < 0)
1473 return -ENOMEM; 1473 return err;
1474 if ((err = snd_fm801_create(card, pci, tea575x_tuner[dev], &chip)) < 0) { 1474 if ((err = snd_fm801_create(card, pci, tea575x_tuner[dev], &chip)) < 0) {
1475 snd_card_free(card); 1475 snd_card_free(card);
1476 return err; 1476 return err;
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index f04de115ee11..ad5df2ae6f7d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2335,10 +2335,10 @@ static int __devinit azx_probe(struct pci_dev *pci,
2335 return -ENOENT; 2335 return -ENOENT;
2336 } 2336 }
2337 2337
2338 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2338 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2339 if (!card) { 2339 if (err < 0) {
2340 snd_printk(KERN_ERR SFX "Error creating card!\n"); 2340 snd_printk(KERN_ERR SFX "Error creating card!\n");
2341 return -ENOMEM; 2341 return err;
2342 } 2342 }
2343 2343
2344 err = azx_create(card, pci, dev, pci_id->driver_data, &chip); 2344 err = azx_create(card, pci, dev, pci_id->driver_data, &chip);
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index 58d7cda03de5..bab1c700f497 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2648,9 +2648,9 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
2648 return -ENOENT; 2648 return -ENOENT;
2649 } 2649 }
2650 2650
2651 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2651 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2652 if (card == NULL) 2652 if (err < 0)
2653 return -ENOMEM; 2653 return err;
2654 2654
2655 strcpy(card->driver, "ICE1712"); 2655 strcpy(card->driver, "ICE1712");
2656 strcpy(card->shortname, "ICEnsemble ICE1712"); 2656 strcpy(card->shortname, "ICEnsemble ICE1712");
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index bb8d8c766b9d..7ff36d3f0f44 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -2456,9 +2456,9 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci,
2456 return -ENOENT; 2456 return -ENOENT;
2457 } 2457 }
2458 2458
2459 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2459 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2460 if (card == NULL) 2460 if (err < 0)
2461 return -ENOMEM; 2461 return err;
2462 2462
2463 strcpy(card->driver, "ICE1724"); 2463 strcpy(card->driver, "ICE1724");
2464 strcpy(card->shortname, "ICEnsemble ICE1724"); 2464 strcpy(card->shortname, "ICEnsemble ICE1724");
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 19d3391e229f..671ff65db029 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -3058,9 +3058,9 @@ static int __devinit snd_intel8x0_probe(struct pci_dev *pci,
3058 int err; 3058 int err;
3059 struct shortname_table *name; 3059 struct shortname_table *name;
3060 3060
3061 card = snd_card_new(index, id, THIS_MODULE, 0); 3061 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
3062 if (card == NULL) 3062 if (err < 0)
3063 return -ENOMEM; 3063 return err;
3064 3064
3065 if (spdif_aclink < 0) 3065 if (spdif_aclink < 0)
3066 spdif_aclink = check_default_spdif_aclink(pci); 3066 spdif_aclink = check_default_spdif_aclink(pci);
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
index 93449e464566..33a843c19316 100644
--- a/sound/pci/intel8x0m.c
+++ b/sound/pci/intel8x0m.c
@@ -1269,9 +1269,9 @@ static int __devinit snd_intel8x0m_probe(struct pci_dev *pci,
1269 int err; 1269 int err;
1270 struct shortname_table *name; 1270 struct shortname_table *name;
1271 1271
1272 card = snd_card_new(index, id, THIS_MODULE, 0); 1272 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
1273 if (card == NULL) 1273 if (err < 0)
1274 return -ENOMEM; 1274 return err;
1275 1275
1276 strcpy(card->driver, "ICH-MODEM"); 1276 strcpy(card->driver, "ICH-MODEM");
1277 strcpy(card->shortname, "Intel ICH"); 1277 strcpy(card->shortname, "Intel ICH");
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
index 5f8006b42750..8b79969034be 100644
--- a/sound/pci/korg1212/korg1212.c
+++ b/sound/pci/korg1212/korg1212.c
@@ -2443,9 +2443,9 @@ snd_korg1212_probe(struct pci_dev *pci,
2443 dev++; 2443 dev++;
2444 return -ENOENT; 2444 return -ENOENT;
2445 } 2445 }
2446 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2446 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2447 if (card == NULL) 2447 if (err < 0)
2448 return -ENOMEM; 2448 return err;
2449 2449
2450 if ((err = snd_korg1212_create(card, pci, &korg1212)) < 0) { 2450 if ((err = snd_korg1212_create(card, pci, &korg1212)) < 0) {
2451 snd_card_free(card); 2451 snd_card_free(card);
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 59bbaf8f3e5b..70141548f251 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2691,9 +2691,9 @@ snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
2691 return -ENOENT; 2691 return -ENOENT;
2692 } 2692 }
2693 2693
2694 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2694 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2695 if (card == NULL) 2695 if (err < 0)
2696 return -ENOMEM; 2696 return err;
2697 2697
2698 switch (pci->device) { 2698 switch (pci->device) {
2699 case PCI_DEVICE_ID_ESS_ALLEGRO: 2699 case PCI_DEVICE_ID_ESS_ALLEGRO:
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index f23a73577c22..bfc19e36c4b6 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -1365,12 +1365,12 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
1365 else 1365 else
1366 idx = index[dev] + i; 1366 idx = index[dev] + i;
1367 snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev] ? id[dev] : "MIXART", i); 1367 snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev] ? id[dev] : "MIXART", i);
1368 card = snd_card_new(idx, tmpid, THIS_MODULE, 0); 1368 err = snd_card_create(idx, tmpid, THIS_MODULE, 0, &card);
1369 1369
1370 if (! card) { 1370 if (err < 0) {
1371 snd_printk(KERN_ERR "cannot allocate the card %d\n", i); 1371 snd_printk(KERN_ERR "cannot allocate the card %d\n", i);
1372 snd_mixart_free(mgr); 1372 snd_mixart_free(mgr);
1373 return -ENOMEM; 1373 return err;
1374 } 1374 }
1375 1375
1376 strcpy(card->driver, CARD_NAME); 1376 strcpy(card->driver, CARD_NAME);
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
index 50c9f8a05082..522a040855d4 100644
--- a/sound/pci/nm256/nm256.c
+++ b/sound/pci/nm256/nm256.c
@@ -1668,9 +1668,9 @@ static int __devinit snd_nm256_probe(struct pci_dev *pci,
1668 } 1668 }
1669 } 1669 }
1670 1670
1671 card = snd_card_new(index, id, THIS_MODULE, 0); 1671 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
1672 if (card == NULL) 1672 if (err < 0)
1673 return -ENOMEM; 1673 return err;
1674 1674
1675 switch (pci->device) { 1675 switch (pci->device) {
1676 case PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO: 1676 case PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO:
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index 84f481d41efa..9c81e0b05113 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -459,10 +459,10 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
459 struct oxygen *chip; 459 struct oxygen *chip;
460 int err; 460 int err;
461 461
462 card = snd_card_new(index, id, model->owner, 462 err = snd_card_create(index, id, model->owner,
463 sizeof *chip + model->model_data_size); 463 sizeof(*chip) + model->model_data_size, &card);
464 if (!card) 464 if (err < 0)
465 return -ENOMEM; 465 return err;
466 466
467 chip = card->private_data; 467 chip = card->private_data;
468 chip->card = card; 468 chip->card = card;
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index 27cf2c28d113..7f95459c8b1f 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -1510,12 +1510,12 @@ static int __devinit pcxhr_probe(struct pci_dev *pci,
1510 1510
1511 snprintf(tmpid, sizeof(tmpid), "%s-%d", 1511 snprintf(tmpid, sizeof(tmpid), "%s-%d",
1512 id[dev] ? id[dev] : card_name, i); 1512 id[dev] ? id[dev] : card_name, i);
1513 card = snd_card_new(idx, tmpid, THIS_MODULE, 0); 1513 err = snd_card_create(idx, tmpid, THIS_MODULE, 0, &card);
1514 1514
1515 if (! card) { 1515 if (err < 0) {
1516 snd_printk(KERN_ERR "cannot allocate the card %d\n", i); 1516 snd_printk(KERN_ERR "cannot allocate the card %d\n", i);
1517 pcxhr_free(mgr); 1517 pcxhr_free(mgr);
1518 return -ENOMEM; 1518 return err;
1519 } 1519 }
1520 1520
1521 strcpy(card->driver, DRIVER_NAME); 1521 strcpy(card->driver, DRIVER_NAME);
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index 3caacfb9d8e0..6f1034417a02 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -2102,9 +2102,9 @@ snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
2102 return -ENOENT; 2102 return -ENOENT;
2103 } 2103 }
2104 2104
2105 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 2105 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
2106 if (card == NULL) 2106 if (err < 0)
2107 return -ENOMEM; 2107 return err;
2108 if ((err = snd_riptide_create(card, pci, &chip)) < 0) { 2108 if ((err = snd_riptide_create(card, pci, &chip)) < 0) {
2109 snd_card_free(card); 2109 snd_card_free(card);
2110 return err; 2110 return err;
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c
index e7ef3a1a25a8..d7b966e7c4cf 100644
--- a/sound/pci/rme32.c
+++ b/sound/pci/rme32.c
@@ -1941,9 +1941,10 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
1941 return -ENOENT; 1941 return -ENOENT;
1942 } 1942 }
1943 1943
1944 if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, 1944 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
1945 sizeof(struct rme32))) == NULL) 1945 sizeof(struct rme32), &card);
1946 return -ENOMEM; 1946 if (err < 0)
1947 return err;
1947 card->private_free = snd_rme32_card_free; 1948 card->private_free = snd_rme32_card_free;
1948 rme32 = (struct rme32 *) card->private_data; 1949 rme32 = (struct rme32 *) card->private_data;
1949 rme32->card = card; 1950 rme32->card = card;
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
index 3fdd488d0975..55fb1c131f58 100644
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -2348,9 +2348,10 @@ snd_rme96_probe(struct pci_dev *pci,
2348 dev++; 2348 dev++;
2349 return -ENOENT; 2349 return -ENOENT;
2350 } 2350 }
2351 if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, 2351 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
2352 sizeof(struct rme96))) == NULL) 2352 sizeof(struct rme96), &card);
2353 return -ENOMEM; 2353 if (err < 0)
2354 return err;
2354 card->private_free = snd_rme96_card_free; 2355 card->private_free = snd_rme96_card_free;
2355 rme96 = (struct rme96 *)card->private_data; 2356 rme96 = (struct rme96 *)card->private_data;
2356 rme96->card = card; 2357 rme96->card = card;
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 44d0c15e2b71..05b3f795a168 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -5158,8 +5158,10 @@ static int __devinit snd_hdsp_probe(struct pci_dev *pci,
5158 return -ENOENT; 5158 return -ENOENT;
5159 } 5159 }
5160 5160
5161 if (!(card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct hdsp)))) 5161 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
5162 return -ENOMEM; 5162 sizeof(struct hdsp), &card);
5163 if (err < 0)
5164 return err;
5163 5165
5164 hdsp = (struct hdsp *) card->private_data; 5166 hdsp = (struct hdsp *) card->private_data;
5165 card->private_free = snd_hdsp_card_free; 5167 card->private_free = snd_hdsp_card_free;
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 71231cf1b2b0..d4b4e0d0fee8 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -4503,10 +4503,10 @@ static int __devinit snd_hdspm_probe(struct pci_dev *pci,
4503 return -ENOENT; 4503 return -ENOENT;
4504 } 4504 }
4505 4505
4506 card = snd_card_new(index[dev], id[dev], 4506 err = snd_card_create(index[dev], id[dev],
4507 THIS_MODULE, sizeof(struct hdspm)); 4507 THIS_MODULE, sizeof(struct hdspm), &card);
4508 if (!card) 4508 if (err < 0)
4509 return -ENOMEM; 4509 return err;
4510 4510
4511 hdspm = card->private_data; 4511 hdspm = card->private_data;
4512 card->private_free = snd_hdspm_card_free; 4512 card->private_free = snd_hdspm_card_free;
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
index 2570907134d7..bc539abb2105 100644
--- a/sound/pci/rme9652/rme9652.c
+++ b/sound/pci/rme9652/rme9652.c
@@ -2594,11 +2594,11 @@ static int __devinit snd_rme9652_probe(struct pci_dev *pci,
2594 return -ENOENT; 2594 return -ENOENT;
2595 } 2595 }
2596 2596
2597 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 2597 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
2598 sizeof(struct snd_rme9652)); 2598 sizeof(struct snd_rme9652), &card);
2599 2599
2600 if (!card) 2600 if (err < 0)
2601 return -ENOMEM; 2601 return err;
2602 2602
2603 rme9652 = (struct snd_rme9652 *) card->private_data; 2603 rme9652 = (struct snd_rme9652 *) card->private_data;
2604 card->private_free = snd_rme9652_card_free; 2604 card->private_free = snd_rme9652_card_free;
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index df2007e3be7c..baf6d8e3dabc 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -1387,9 +1387,8 @@ static int __devinit snd_sis7019_probe(struct pci_dev *pci,
1387 if (!enable) 1387 if (!enable)
1388 goto error_out; 1388 goto error_out;
1389 1389
1390 rc = -ENOMEM; 1390 rc = snd_card_create(index, id, THIS_MODULE, sizeof(*sis), &card);
1391 card = snd_card_new(index, id, THIS_MODULE, sizeof(*sis)); 1391 if (rc < 0)
1392 if (!card)
1393 goto error_out; 1392 goto error_out;
1394 1393
1395 strcpy(card->driver, "SiS7019"); 1394 strcpy(card->driver, "SiS7019");
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
index cd408b86c839..c5601b0ad7cc 100644
--- a/sound/pci/sonicvibes.c
+++ b/sound/pci/sonicvibes.c
@@ -1423,9 +1423,9 @@ static int __devinit snd_sonic_probe(struct pci_dev *pci,
1423 return -ENOENT; 1423 return -ENOENT;
1424 } 1424 }
1425 1425
1426 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 1426 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
1427 if (card == NULL) 1427 if (err < 0)
1428 return -ENOMEM; 1428 return err;
1429 for (idx = 0; idx < 5; idx++) { 1429 for (idx = 0; idx < 5; idx++) {
1430 if (pci_resource_start(pci, idx) == 0 || 1430 if (pci_resource_start(pci, idx) == 0 ||
1431 !(pci_resource_flags(pci, idx) & IORESOURCE_IO)) { 1431 !(pci_resource_flags(pci, idx) & IORESOURCE_IO)) {
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c
index d94b16ffb385..21cef97d478d 100644
--- a/sound/pci/trident/trident.c
+++ b/sound/pci/trident/trident.c
@@ -89,9 +89,9 @@ static int __devinit snd_trident_probe(struct pci_dev *pci,
89 return -ENOENT; 89 return -ENOENT;
90 } 90 }
91 91
92 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 92 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
93 if (card == NULL) 93 if (err < 0)
94 return -ENOMEM; 94 return err;
95 95
96 if ((err = snd_trident_create(card, pci, 96 if ((err = snd_trident_create(card, pci,
97 pcm_channels[dev], 97 pcm_channels[dev],
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 1aafe956ee2b..d8705547dae1 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -2433,9 +2433,9 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
2433 unsigned int i; 2433 unsigned int i;
2434 int err; 2434 int err;
2435 2435
2436 card = snd_card_new(index, id, THIS_MODULE, 0); 2436 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
2437 if (card == NULL) 2437 if (err < 0)
2438 return -ENOMEM; 2438 return err;
2439 2439
2440 card_type = pci_id->driver_data; 2440 card_type = pci_id->driver_data;
2441 switch (card_type) { 2441 switch (card_type) {
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
index 5bd79d2a5a15..c086b762c150 100644
--- a/sound/pci/via82xx_modem.c
+++ b/sound/pci/via82xx_modem.c
@@ -1167,9 +1167,9 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
1167 unsigned int i; 1167 unsigned int i;
1168 int err; 1168 int err;
1169 1169
1170 card = snd_card_new(index, id, THIS_MODULE, 0); 1170 err = snd_card_create(index, id, THIS_MODULE, 0, &card);
1171 if (card == NULL) 1171 if (err < 0)
1172 return -ENOMEM; 1172 return err;
1173 1173
1174 card_type = pci_id->driver_data; 1174 card_type = pci_id->driver_data;
1175 switch (card_type) { 1175 switch (card_type) {
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
index acc352f4a441..fc9136c3e0d7 100644
--- a/sound/pci/vx222/vx222.c
+++ b/sound/pci/vx222/vx222.c
@@ -204,9 +204,9 @@ static int __devinit snd_vx222_probe(struct pci_dev *pci,
204 return -ENOENT; 204 return -ENOENT;
205 } 205 }
206 206
207 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 207 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
208 if (card == NULL) 208 if (err < 0)
209 return -ENOMEM; 209 return err;
210 210
211 switch ((int)pci_id->driver_data) { 211 switch ((int)pci_id->driver_data) {
212 case VX_PCI_VX222_OLD: 212 case VX_PCI_VX222_OLD:
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c
index 2631a554845e..4af66661f9b0 100644
--- a/sound/pci/ymfpci/ymfpci.c
+++ b/sound/pci/ymfpci/ymfpci.c
@@ -187,9 +187,9 @@ static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
187 return -ENOENT; 187 return -ENOENT;
188 } 188 }
189 189
190 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 190 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
191 if (card == NULL) 191 if (err < 0)
192 return -ENOMEM; 192 return err;
193 193
194 switch (pci_id->device) { 194 switch (pci_id->device) {
195 case 0x0004: str = "YMF724"; model = "DS-1"; break; 195 case 0x0004: str = "YMF724"; model = "DS-1"; break;