提交 72da1f20 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[media] uvcvideo: remove unneeded access_ok() check

copy_in_user() already checks for write permission, so we don't need to
do it here.  This was added in 1a5e4c86 "[media] uvcvideo: Implement
compat_ioctl32 for custom ioctls".
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 004ac388
......@@ -1105,8 +1105,6 @@ static int uvc_v4l2_put_xu_mapping(const struct uvc_xu_control_mapping *kp,
if (get_user(p, &up->menu_info))
return -EFAULT;
umenus = compat_ptr(p);
if (!access_ok(VERIFY_WRITE, umenus, kp->menu_count * sizeof(*umenus)))
return -EFAULT;
if (copy_in_user(umenus, kmenus, kp->menu_count * sizeof(*umenus)))
return -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册