The patch number 9930 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]>
em28xx: Fix bad locks on error condition


Priority: normal

Signed-off-by: Mauro Carvalho Chehab <[email protected]>


---

 linux/drivers/media/video/em28xx/em28xx-video.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff -r 1b8feb9944dd -r e2ca2b35a801 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Fri Dec 19 16:36:48 
2008 -0800
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Mon Dec 22 07:14:31 
2008 -0200
@@ -825,8 +825,10 @@ static int vidioc_s_fmt_vid_cap(struct f
        vidioc_try_fmt_vid_cap(file, priv, f);
 
        fmt = format_by_fourcc(f->fmt.pix.pixelformat);
-       if (!fmt)
-               return -EINVAL;
+       if (!fmt) {
+               rc = -EINVAL;
+               goto out;
+       }
 
        if (videobuf_queue_is_busy(&fh->vb_vidq)) {
                em28xx_errdev("%s queue busy\n", __func__);
@@ -1317,10 +1319,8 @@ static int vidioc_streamon(struct file *
        mutex_lock(&dev->lock);
        rc = res_get(fh);
 
-       if (unlikely(rc < 0))
-               return rc;
-
-       rc = videobuf_streamon(&fh->vb_vidq);
+       if (likely(rc >= 0))
+               rc = videobuf_streamon(&fh->vb_vidq);
 
        mutex_unlock(&dev->lock);
 


---

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

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to