aboutsummaryrefslogtreecommitdiff
path: root/sound/pcmcia/vx/vxpocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pcmcia/vx/vxpocket.c')
-rw-r--r--sound/pcmcia/vx/vxpocket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 706602a4060..087ded8a8d7 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -292,7 +292,7 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
{
struct snd_card *card;
struct snd_vxpocket *vxp;
- int i;
+ int i, err;
/* find an empty slot from the card list */
for (i = 0; i < SNDRV_CARDS; i++) {
@@ -307,10 +307,10 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
return -ENODEV; /* disabled explicitly */
/* ok, create a card instance */
- card = snd_card_new(index[i], id[i], THIS_MODULE, 0);
- if (card == NULL) {
+ err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card);
+ if (err < 0) {
snd_printk(KERN_ERR "vxpocket: cannot create a card instance\n");
- return -ENOMEM;
+ return err;
}
vxp = snd_vxpocket_new(card, ibl[i], p_dev);