Commit 1fcbcc47 authored by Robert Krakora's avatar Robert Krakora Committed by Mauro Carvalho Chehab

V4L/DVB (12002): uvc: Fix for no return value check of uvc_ctrl_set() which...

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: default avatarRobert Krakora <rob.krakora@messagenetsystems.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6762d953
...@@ -530,7 +530,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) ...@@ -530,7 +530,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
memset(&xctrl, 0, sizeof xctrl); memset(&xctrl, 0, sizeof xctrl);
xctrl.id = ctrl->id; xctrl.id = ctrl->id;
uvc_ctrl_begin(video); ret = uvc_ctrl_begin(video);
if (ret < 0)
return ret;
ret = uvc_ctrl_get(video, &xctrl); ret = uvc_ctrl_get(video, &xctrl);
uvc_ctrl_rollback(video); uvc_ctrl_rollback(video);
if (ret >= 0) if (ret >= 0)
...@@ -547,7 +550,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) ...@@ -547,7 +550,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
xctrl.id = ctrl->id; xctrl.id = ctrl->id;
xctrl.value = ctrl->value; xctrl.value = ctrl->value;
uvc_ctrl_begin(video); ret = uvc_ctrl_begin(video);
if (ret < 0)
return ret;
ret = uvc_ctrl_set(video, &xctrl); ret = uvc_ctrl_set(video, &xctrl);
if (ret < 0) { if (ret < 0) {
uvc_ctrl_rollback(video); uvc_ctrl_rollback(video);
...@@ -566,7 +572,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) ...@@ -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; struct v4l2_ext_control *ctrl = ctrls->controls;
unsigned int i; 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) { for (i = 0; i < ctrls->count; ++ctrl, ++i) {
ret = uvc_ctrl_get(video, ctrl); ret = uvc_ctrl_get(video, ctrl);
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment