Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109564
b: refs/heads/master
c: 0f523c2
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Sep 3, 2008
1 parent 881eef6 commit b4e21ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f50ba1bed3cfd65d6899afc4cb77299ee5c297ae
refs/heads/master: 0f523c2ff6b5ab3b4412cf56dee77ac57be24103
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ static int vidioc_queryctrl(struct file *file, void *priv,
id &= V4L2_CTRL_ID_MASK;
id++;
for (i = 0; i < gspca_dev->sd_desc->nctrls; i++) {
if (id < gspca_dev->sd_desc->ctrls[i].qctrl.id)
if (gspca_dev->sd_desc->ctrls[i].qctrl.id < id)
continue;
if (ix < 0) {
ix = i;
Expand Down Expand Up @@ -908,6 +908,8 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
i++, ctrls++) {
if (ctrl->id != ctrls->qctrl.id)
continue;
if (gspca_dev->ctrl_dis & (1 << i))
return -EINVAL;
if (ctrl->value < ctrls->qctrl.minimum
|| ctrl->value > ctrls->qctrl.maximum)
return -ERANGE;
Expand All @@ -934,6 +936,8 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
i++, ctrls++) {
if (ctrl->id != ctrls->qctrl.id)
continue;
if (gspca_dev->ctrl_dis & (1 << i))
return -EINVAL;
if (mutex_lock_interruptible(&gspca_dev->usb_lock))
return -ERESTARTSYS;
ret = ctrls->get(gspca_dev, &ctrl->value);
Expand Down

0 comments on commit b4e21ed

Please sign in to comment.