diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-12 16:51:03 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-12 16:51:03 +0000 |
commit | 609bc704ffcafedc2596bd393b0aab789fa7f9f6 (patch) | |
tree | 4b1a9384d2a821e92ba537145345332d20d40fd9 /linux/drivers/media/video | |
parent | 4a2e9d7d8ff2bfc867b6ac6b4ebf2c831b1c6e0a (diff) | |
download | mediapointer-dvb-s2-609bc704ffcafedc2596bd393b0aab789fa7f9f6.tar.gz mediapointer-dvb-s2-609bc704ffcafedc2596bd393b0aab789fa7f9f6.tar.bz2 |
uvc: Fix for no return value check of uvc_ctrl_set() which calls mutex_lock_interruptible()
From: Robert Krakora <rob.krakora@messagenetsystems.com>
Fix for no return value check of uvc_ctrl_set() which calls
mutex_lock_interruptible().
Priority: normal
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 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_v4l2.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_v4l2.c b/linux/drivers/media/video/uvc/uvc_v4l2.c index 736d8ae23..0be85adf3 100644 --- a/linux/drivers/media/video/uvc/uvc_v4l2.c +++ b/linux/drivers/media/video/uvc/uvc_v4l2.c @@ -538,7 +538,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) @@ -555,7 +558,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); @@ -574,7 +580,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) { |