]> git.karo-electronics.de Git - linux-beck.git/commitdiff
V4L/DVB (12002): uvc: Fix for no return value check of uvc_ctrl_set() which calls...
authorRobert Krakora <rob.krakora@messagenetsystems.com>
Fri, 12 Jun 2009 16:51:03 +0000 (13:51 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 16 Jun 2009 22:07:57 +0000 (19:07 -0300)
Fix for no return value check of uvc_ctrl_set() which calls
mutex_lock_interruptible().

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_v4l2.c

index f8b94d608a102af72ac30b3c11f9cdda422f0a79..5e77cad29690112bb734486a62e8b766f0eebb6e 100644 (file)
@@ -530,7 +530,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
                memset(&xctrl, 0, sizeof xctrl);
                xctrl.id = ctrl->id;
 
-               uvc_ctrl_begin(video);
+              ret = uvc_ctrl_begin(video);
+              if (ret < 0)
+                       return ret;
+
                ret = uvc_ctrl_get(video, &xctrl);
                uvc_ctrl_rollback(video);
                if (ret >= 0)
@@ -547,7 +550,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
                xctrl.id = ctrl->id;
                xctrl.value = ctrl->value;
 
-               uvc_ctrl_begin(video);
+              ret = uvc_ctrl_begin(video);
+              if (ret < 0)
+                       return ret;
+
                ret = uvc_ctrl_set(video, &xctrl);
                if (ret < 0) {
                        uvc_ctrl_rollback(video);
@@ -566,7 +572,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
                struct v4l2_ext_control *ctrl = ctrls->controls;
                unsigned int i;
 
-               uvc_ctrl_begin(video);
+              ret = uvc_ctrl_begin(video);
+              if (ret < 0)
+                       return ret;
+
                for (i = 0; i < ctrls->count; ++ctrl, ++i) {
                        ret = uvc_ctrl_get(video, ctrl);
                        if (ret < 0) {