aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRobert Krakora <rob.krakora@messagenetsystems.com>2009-06-12 12:51:03 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 18:07:57 -0400
commit1fcbcc47d3ebd962f5486697cb85fd216e01cf89 (patch)
tree80fc662cda876b32317a70a4e5df7751be023379 /drivers
parent6762d953a36833c8b94090781c791c67cb546080 (diff)
V4L/DVB (12002): uvc: Fix for no return value check of uvc_ctrl_set() which calls mutex_lock_interruptible()
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index f8b94d608a10..5e77cad29690 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -530,7 +530,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
530 memset(&xctrl, 0, sizeof xctrl); 530 memset(&xctrl, 0, sizeof xctrl);
531 xctrl.id = ctrl->id; 531 xctrl.id = ctrl->id;
532 532
533 uvc_ctrl_begin(video); 533 ret = uvc_ctrl_begin(video);
534 if (ret < 0)
535 return ret;
536
534 ret = uvc_ctrl_get(video, &xctrl); 537 ret = uvc_ctrl_get(video, &xctrl);
535 uvc_ctrl_rollback(video); 538 uvc_ctrl_rollback(video);
536 if (ret >= 0) 539 if (ret >= 0)
@@ -547,7 +550,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
547 xctrl.id = ctrl->id; 550 xctrl.id = ctrl->id;
548 xctrl.value = ctrl->value; 551 xctrl.value = ctrl->value;
549 552
550 uvc_ctrl_begin(video); 553 ret = uvc_ctrl_begin(video);
554 if (ret < 0)
555 return ret;
556
551 ret = uvc_ctrl_set(video, &xctrl); 557 ret = uvc_ctrl_set(video, &xctrl);
552 if (ret < 0) { 558 if (ret < 0) {
553 uvc_ctrl_rollback(video); 559 uvc_ctrl_rollback(video);
@@ -566,7 +572,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
566 struct v4l2_ext_control *ctrl = ctrls->controls; 572 struct v4l2_ext_control *ctrl = ctrls->controls;
567 unsigned int i; 573 unsigned int i;
568 574
569 uvc_ctrl_begin(video); 575 ret = uvc_ctrl_begin(video);
576 if (ret < 0)
577 return ret;
578
570 for (i = 0; i < ctrls->count; ++ctrl, ++i) { 579 for (i = 0; i < ctrls->count; ++ctrl, ++i) {
571 ret = uvc_ctrl_get(video, ctrl); 580 ret = uvc_ctrl_get(video, ctrl);
572 if (ret < 0) { 581 if (ret < 0) {