summaryrefslogtreecommitdiff
path: root/drivers/media/video/videodev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r--drivers/media/video/videodev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 764a53b70db2..dc9b1ef678aa 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -1457,7 +1457,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_DBG_G_REGISTER:
{
struct v4l2_register *p=arg;
- if (vfd->vidioc_g_register)
+ if (!capable(CAP_SYS_ADMIN))
+ ret=-EPERM;
+ else if (vfd->vidioc_g_register)
ret=vfd->vidioc_g_register(file, fh, p);
break;
}