aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-01-11 07:32:04 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-01-11 10:30:14 -0500
commit29005c09f41d459c458eb8761a54703b56afb16a (patch)
tree58615b031f238f8575935103397fbd55a9078092 /drivers/media
parent9bf42300e672fb1b5587d1da5486f8b144e74598 (diff)
[media] uvcvideo: Cleanup leftovers of partial revert
Commit ba68c8530a263dc4de440fa10bb20a1c5b9d4ff5 (Partly revert "[media] uvcvideo: Set error_idx properly for extended controls API failures") missed two modifications. Clean them up. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/uvc/uvc_v4l2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index f2ee8c6b0d8d..5eb89894f90b 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -657,8 +657,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
657 ret = uvc_ctrl_get(chain, ctrl); 657 ret = uvc_ctrl_get(chain, ctrl);
658 if (ret < 0) { 658 if (ret < 0) {
659 uvc_ctrl_rollback(handle); 659 uvc_ctrl_rollback(handle);
660 ctrls->error_idx = ret == -ENOENT 660 ctrls->error_idx = i;
661 ? ctrls->count : i;
662 return ret; 661 return ret;
663 } 662 }
664 } 663 }
@@ -686,9 +685,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
686 ret = uvc_ctrl_set(chain, ctrl); 685 ret = uvc_ctrl_set(chain, ctrl);
687 if (ret < 0) { 686 if (ret < 0) {
688 uvc_ctrl_rollback(handle); 687 uvc_ctrl_rollback(handle);
689 ctrls->error_idx = (ret == -ENOENT && 688 ctrls->error_idx = i;
690 cmd == VIDIOC_S_EXT_CTRLS)
691 ? ctrls->count : i;
692 return ret; 689 return ret;
693 } 690 }
694 } 691 }