aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/opti9xx
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/opti9xx')
-rw-r--r--sound/isa/opti9xx/miro.c7
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c25
2 files changed, 18 insertions, 14 deletions
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 440755cc0013..02e30d7c6a93 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -1228,9 +1228,10 @@ static int __devinit snd_miro_probe(struct device *devptr, unsigned int n)
1228 struct snd_pcm *pcm; 1228 struct snd_pcm *pcm;
1229 struct snd_rawmidi *rmidi; 1229 struct snd_rawmidi *rmidi;
1230 1230
1231 if (!(card = snd_card_new(index, id, THIS_MODULE, 1231 error = snd_card_create(index, id, THIS_MODULE,
1232 sizeof(struct snd_miro)))) 1232 sizeof(struct snd_miro), &card);
1233 return -ENOMEM; 1233 if (error < 0)
1234 return error;
1234 1235
1235 card->private_free = snd_card_miro_free; 1236 card->private_free = snd_card_miro_free;
1236 miro = card->private_data; 1237 miro = card->private_data;
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index d5bc0e03132a..5cd555325b9d 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -828,15 +828,18 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
828 return snd_card_register(card); 828 return snd_card_register(card);
829} 829}
830 830
831static struct snd_card *snd_opti9xx_card_new(void) 831static int snd_opti9xx_card_new(struct snd_card **cardp)
832{ 832{
833 struct snd_card *card; 833 struct snd_card *card;
834 int err;
834 835
835 card = snd_card_new(index, id, THIS_MODULE, sizeof(struct snd_opti9xx)); 836 err = snd_card_create(index, id, THIS_MODULE,
836 if (! card) 837 sizeof(struct snd_opti9xx), &card);
837 return NULL; 838 if (err < 0)
839 return err;
838 card->private_free = snd_card_opti9xx_free; 840 card->private_free = snd_card_opti9xx_free;
839 return card; 841 *cardp = card;
842 return 0;
840} 843}
841 844
842static int __devinit snd_opti9xx_isa_match(struct device *devptr, 845static int __devinit snd_opti9xx_isa_match(struct device *devptr,
@@ -901,9 +904,9 @@ static int __devinit snd_opti9xx_isa_probe(struct device *devptr,
901 } 904 }
902#endif 905#endif
903 906
904 card = snd_opti9xx_card_new(); 907 error = snd_opti9xx_card_new(&card);
905 if (! card) 908 if (error < 0)
906 return -ENOMEM; 909 return error;
907 910
908 if ((error = snd_card_opti9xx_detect(card, card->private_data)) < 0) { 911 if ((error = snd_card_opti9xx_detect(card, card->private_data)) < 0) {
909 snd_card_free(card); 912 snd_card_free(card);
@@ -948,9 +951,9 @@ static int __devinit snd_opti9xx_pnp_probe(struct pnp_card_link *pcard,
948 return -EBUSY; 951 return -EBUSY;
949 if (! isapnp) 952 if (! isapnp)
950 return -ENODEV; 953 return -ENODEV;
951 card = snd_opti9xx_card_new(); 954 error = snd_opti9xx_card_new(&card);
952 if (! card) 955 if (error < 0)
953 return -ENOMEM; 956 return error;
954 chip = card->private_data; 957 chip = card->private_data;
955 958
956 hw = snd_card_opti9xx_pnp(chip, pcard, pid); 959 hw = snd_card_opti9xx_pnp(chip, pcard, pid);