[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 1a5e4c867c
"[media] uvcvideo: Implement
compat_ioctl32 for custom ioctls".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
004ac38859
commit
72da1f20af
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user