The patch number 9532 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Mauro Carvalho Chehab  <[EMAIL PROTECTED]>
Properly handle error messages during alsa registering


Priority: normal

Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/em28xx/em28xx-audio.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff -r 0c3caa20d444 -r 46604f47fca1 
linux/drivers/media/video/em28xx/em28xx-audio.c
--- a/linux/drivers/media/video/em28xx/em28xx-audio.c   Thu Nov 06 23:02:07 
2008 +0100
+++ b/linux/drivers/media/video/em28xx/em28xx-audio.c   Fri Nov 07 15:24:18 
2008 -0200
@@ -500,7 +500,7 @@ static int em28xx_audio_init(struct em28
 
        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 em28
        }
 
        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 em28
        err = snd_card_register(card);
        if (err < 0) {
                snd_card_free(card);
-               return -ENOMEM;
+               return err;
        }
        adev->sndcard = card;
        adev->udev = dev->udev;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/46604f47fca16225c854ad69c3d8a335c94d5448

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to