Skip to content

Commit

Permalink
[media] uvcvideo: remove unneeded access_ok() check
Browse files Browse the repository at this point in the history
copy_in_user() already checks for write permission, so we don't need to
do it here.  This was added in 1a5e4c8 "[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>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Apr 10, 2012
1 parent 004ac38 commit 72da1f2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/media/video/uvc/uvc_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 72da1f2

Please sign in to comment.