aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-21 01:35:23 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-04-10 14:43:39 -0400
commit72da1f20afae1bd3f7ee4a27b2b8cda8838d61ef (patch)
tree977ad75bfeb9cebfa143811ceb35b14515b30949 /drivers/media/video/uvc
parent004ac38859c5bbcc4ffccc37d33be5e467d61c28 (diff)
[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>
Diffstat (limited to 'drivers/media/video/uvc')
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index ff2cdddf9bc6..111bfff1640d 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -1105,8 +1105,6 @@ static int uvc_v4l2_put_xu_mapping(const struct uvc_xu_control_mapping *kp,
1105 if (get_user(p, &up->menu_info)) 1105 if (get_user(p, &up->menu_info))
1106 return -EFAULT; 1106 return -EFAULT;
1107 umenus = compat_ptr(p); 1107 umenus = compat_ptr(p);
1108 if (!access_ok(VERIFY_WRITE, umenus, kp->menu_count * sizeof(*umenus)))
1109 return -EFAULT;
1110 1108
1111 if (copy_in_user(umenus, kmenus, kp->menu_count * sizeof(*umenus))) 1109 if (copy_in_user(umenus, kmenus, kp->menu_count * sizeof(*umenus)))
1112 return -EFAULT; 1110 return -EFAULT;