[media] uvcvideo: remove unneeded access_ok() check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 21 Mar 2012 05:35:23 +0000 (02:35 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 10 Apr 2012 18:43:39 +0000 (15:43 -0300)
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>
drivers/media/video/uvc/uvc_v4l2.c

index ff2cdddf9bc629c6d264390e6a68fb9c9c2d581a..111bfff1640dff0b8f26b0d09760e9b8daf1b9b1 100644 (file)
@@ -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;