Skip to content

Commit 29005c0

Browse files
pinchartlMauro Carvalho Chehab
authored andcommitted
[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>
1 parent 9bf4230 commit 29005c0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/media/usb/uvc/uvc_v4l2.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
657657
ret = uvc_ctrl_get(chain, ctrl);
658658
if (ret < 0) {
659659
uvc_ctrl_rollback(handle);
660-
ctrls->error_idx = ret == -ENOENT
661-
? ctrls->count : i;
660+
ctrls->error_idx = i;
662661
return ret;
663662
}
664663
}
@@ -686,9 +685,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
686685
ret = uvc_ctrl_set(chain, ctrl);
687686
if (ret < 0) {
688687
uvc_ctrl_rollback(handle);
689-
ctrls->error_idx = (ret == -ENOENT &&
690-
cmd == VIDIOC_S_EXT_CTRLS)
691-
? ctrls->count : i;
688+
ctrls->error_idx = i;
692689
return ret;
693690
}
694691
}

0 commit comments

Comments
 (0)