Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192980
b: refs/heads/master
c: 124371e
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent bad95fc commit 8a3e4bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 67e13e7709736b3b25dda98f92cc7164b210dda6
refs/heads/master: 124371e33ce733a81fde8419946adb0d6c14f4c0
6 changes: 4 additions & 2 deletions trunk/drivers/media/video/sn9c102/sn9c102_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ sn9c102_vidioc_s_ctrl(struct sn9c102_device* cam, void __user * arg)
if (copy_from_user(&ctrl, arg, sizeof(ctrl)))
return -EFAULT;

for (i = 0; i < ARRAY_SIZE(s->qctrl); i++)
for (i = 0; i < ARRAY_SIZE(s->qctrl); i++) {
if (ctrl.id == s->qctrl[i].id) {
if (s->qctrl[i].flags & V4L2_CTRL_FLAG_DISABLED)
return -EINVAL;
Expand All @@ -2305,7 +2305,9 @@ sn9c102_vidioc_s_ctrl(struct sn9c102_device* cam, void __user * arg)
ctrl.value -= ctrl.value % s->qctrl[i].step;
break;
}

}
if (i == ARRAY_SIZE(s->qctrl))
return -EINVAL;
if ((err = s->set_ctrl(cam, &ctrl)))
return err;

Expand Down

0 comments on commit 8a3e4bf

Please sign in to comment.