aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-audio.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index 7a8d49ef646e..215ee789f107 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -428,7 +428,7 @@ static int em28xx_audio_init(struct em28xx *dev)
428 428
429 if (dev->has_audio_class) { 429 if (dev->has_audio_class) {
430 /* This device does not support the extension (in this case 430 /* This device does not support the extension (in this case
431 the device is expecting the snd-usb-audio module */ 431 the device is expecting the snd-usb-audio module) */
432 return 0; 432 return 0;
433 } 433 }
434 434
@@ -449,7 +449,12 @@ static int em28xx_audio_init(struct em28xx *dev)
449 } 449 }
450 450
451 spin_lock_init(&adev->slock); 451 spin_lock_init(&adev->slock);
452 ret = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm); 452 err = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm);
453 if (err < 0) {
454 snd_card_free(card);
455 return err;
456 }
457
453 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_em28xx_pcm_capture); 458 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_em28xx_pcm_capture);
454 pcm->info_flags = 0; 459 pcm->info_flags = 0;
455 pcm->private_data = dev; 460 pcm->private_data = dev;
@@ -461,7 +466,7 @@ static int em28xx_audio_init(struct em28xx *dev)
461 err = snd_card_register(card); 466 err = snd_card_register(card);
462 if (err < 0) { 467 if (err < 0) {
463 snd_card_free(card); 468 snd_card_free(card);
464 return -ENOMEM; 469 return err;
465 } 470 }
466 adev->sndcard = card; 471 adev->sndcard = card;
467 adev->udev = dev->udev; 472 adev->udev = dev->udev;