summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-11-10 09:41:22 +0100
committerJean-Francois Moine <moinejf@free.fr>2008-11-10 09:41:22 +0100
commitc437e02ab7f61577a04a065d30e6ea3d401cb2b8 (patch)
tree7ff6da093d0d44b11ad9ed9adfcd974de771d05f /linux/drivers/media/video
parent01dc44fd923db93973cff119d441049abc1d669b (diff)
parent94d05a47bd31702be24fbef3b4ee9448083295d6 (diff)
downloadmediapointer-dvb-s2-c437e02ab7f61577a04a065d30e6ea3d401cb2b8.tar.gz
mediapointer-dvb-s2-c437e02ab7f61577a04a065d30e6ea3d401cb2b8.tar.bz2
merge: v4l-dvb
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-audio.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-audio.c b/linux/drivers/media/video/em28xx/em28xx-audio.c
index d6856b331..bec42349e 100644
--- a/linux/drivers/media/video/em28xx/em28xx-audio.c
+++ b/linux/drivers/media/video/em28xx/em28xx-audio.c
@@ -500,7 +500,7 @@ static int em28xx_audio_init(struct em28xx *dev)
if (dev->has_audio_class) {
/* This device does not support the extension (in this case
- the device is expecting the snd-usb-audio module */
+ the device is expecting the snd-usb-audio module) */
return 0;
}
@@ -521,7 +521,12 @@ static int em28xx_audio_init(struct em28xx *dev)
}
spin_lock_init(&adev->slock);
- ret = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm);
+ err = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm);
+ if (err < 0) {
+ snd_card_free(card);
+ return err;
+ }
+
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_em28xx_pcm_capture);
pcm->info_flags = 0;
pcm->private_data = dev;
@@ -533,7 +538,7 @@ static int em28xx_audio_init(struct em28xx *dev)
err = snd_card_register(card);
if (err < 0) {
snd_card_free(card);
- return -ENOMEM;
+ return err;
}
adev->sndcard = card;
adev->udev = dev->udev;