Commit 29005c09 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9bf42300
...@@ -657,8 +657,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) ...@@ -657,8 +657,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
ret = uvc_ctrl_get(chain, ctrl); ret = uvc_ctrl_get(chain, ctrl);
if (ret < 0) { if (ret < 0) {
uvc_ctrl_rollback(handle); uvc_ctrl_rollback(handle);
ctrls->error_idx = ret == -ENOENT ctrls->error_idx = i;
? ctrls->count : i;
return ret; return ret;
} }
} }
...@@ -686,9 +685,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) ...@@ -686,9 +685,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
ret = uvc_ctrl_set(chain, ctrl); ret = uvc_ctrl_set(chain, ctrl);
if (ret < 0) { if (ret < 0) {
uvc_ctrl_rollback(handle); uvc_ctrl_rollback(handle);
ctrls->error_idx = (ret == -ENOENT && ctrls->error_idx = i;
cmd == VIDIOC_S_EXT_CTRLS)
? ctrls->count : i;
return ret; return ret;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment