summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/caiaq/caiaq-device.c7
-rw-r--r--sound/usb/usbaudio.c6
-rw-r--r--sound/usb/usx2y/us122l.c8
-rw-r--r--sound/usb/usx2y/usbusx2y.c7
4 files changed, 17 insertions, 11 deletions
diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c
index a62500e..63a2c1d 100644
--- a/sound/usb/caiaq/caiaq-device.c
+++ b/sound/usb/caiaq/caiaq-device.c
@@ -339,6 +339,7 @@ static void __devinit setup_card(struct snd_usb_caiaqdev *dev)
static struct snd_card* create_card(struct usb_device* usb_dev)
{
int devnum;
+ int err;
struct snd_card *card;
struct snd_usb_caiaqdev *dev;
@@ -349,9 +350,9 @@ static struct snd_card* create_card(struct usb_device* usb_dev)
if (devnum >= SNDRV_CARDS)
return NULL;
- card = snd_card_new(index[devnum], id[devnum], THIS_MODULE,
- sizeof(struct snd_usb_caiaqdev));
- if (!card)
+ err = snd_card_create(index[devnum], id[devnum], THIS_MODULE,
+ sizeof(struct snd_usb_caiaqdev), &card);
+ if (err < 0)
return NULL;
dev = caiaqdev(card);
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index c709b95..eec32e1 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3463,10 +3463,10 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
return -ENXIO;
}
- card = snd_card_new(index[idx], id[idx], THIS_MODULE, 0);
- if (card == NULL) {
+ err = snd_card_create(index[idx], id[idx], THIS_MODULE, 0, &card);
+ if (err < 0) {
snd_printk(KERN_ERR "cannot create card instance %d\n", idx);
- return -ENOMEM;
+ return err;
}
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c
index 73e59f4..b21bb47 100644
--- a/sound/usb/usx2y/us122l.c
+++ b/sound/usb/usx2y/us122l.c
@@ -482,14 +482,16 @@ static struct snd_card *usx2y_create_card(struct usb_device *device)
{
int dev;
struct snd_card *card;
+ int err;
+
for (dev = 0; dev < SNDRV_CARDS; ++dev)
if (enable[dev] && !snd_us122l_card_used[dev])
break;
if (dev >= SNDRV_CARDS)
return NULL;
- card = snd_card_new(index[dev], id[dev], THIS_MODULE,
- sizeof(struct us122l));
- if (!card)
+ err = snd_card_create(index[dev], id[dev], THIS_MODULE,
+ sizeof(struct us122l), &card);
+ if (err < 0)
return NULL;
snd_us122l_card_used[US122L(card)->chip.index = dev] = 1;
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c
index 11639bd..b848a18 100644
--- a/sound/usb/usx2y/usbusx2y.c
+++ b/sound/usb/usx2y/usbusx2y.c
@@ -337,13 +337,16 @@ static struct snd_card *usX2Y_create_card(struct usb_device *device)
{
int dev;
struct snd_card * card;
+ int err;
+
for (dev = 0; dev < SNDRV_CARDS; ++dev)
if (enable[dev] && !snd_usX2Y_card_used[dev])
break;
if (dev >= SNDRV_CARDS)
return NULL;
- card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct usX2Ydev));
- if (!card)
+ err = snd_card_create(index[dev], id[dev], THIS_MODULE,
+ sizeof(struct usX2Ydev), &card);
+ if (err < 0)
return NULL;
snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1;
card->private_free = snd_usX2Y_card_private_free;
OpenPOWER on IntegriCloud