This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] mem2mem_testdev: unlock and return error code properly
Author:  Dan Carpenter <[email protected]>
Date:    Tue Aug 14 02:58:56 2012 -0300

We recently added locking to this function, but there was an error path
which accidentally returned holding a lock.  Also we returned zero on
failure on some paths instead of the error code.

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

 drivers/media/platform/mem2mem_testdev.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=a7bd775628006f7da1b94d7a5def6746f55f2321

diff --git a/drivers/media/platform/mem2mem_testdev.c 
b/drivers/media/platform/mem2mem_testdev.c
index 6d0d2fb..51b6dd4 100644
--- a/drivers/media/platform/mem2mem_testdev.c
+++ b/drivers/media/platform/mem2mem_testdev.c
@@ -911,10 +911,9 @@ static int m2mtest_open(struct file *file)
        v4l2_ctrl_new_custom(hdl, &m2mtest_ctrl_trans_time_msec, NULL);
        v4l2_ctrl_new_custom(hdl, &m2mtest_ctrl_trans_num_bufs, NULL);
        if (hdl->error) {
-               int err = hdl->error;
-
+               rc = hdl->error;
                v4l2_ctrl_handler_free(hdl);
-               return err;
+               goto open_unlock;
        }
        ctx->fh.ctrl_handler = hdl;
        v4l2_ctrl_handler_setup(hdl);
@@ -946,7 +945,7 @@ static int m2mtest_open(struct file *file)
 
 open_unlock:
        mutex_unlock(&dev->dev_mutex);
-       return 0;
+       return rc;
 }
 
 static int m2mtest_release(struct file *file)

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

Reply via email to