diff options
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r-- | drivers/media/video/videodev.c | 4 |
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, | |||
1457 | case VIDIOC_DBG_G_REGISTER: | 1457 | case VIDIOC_DBG_G_REGISTER: |
1458 | { | 1458 | { |
1459 | struct v4l2_register *p=arg; | 1459 | struct v4l2_register *p=arg; |
1460 | if (vfd->vidioc_g_register) | 1460 | if (!capable(CAP_SYS_ADMIN)) |
1461 | ret=-EPERM; | ||
1462 | else if (vfd->vidioc_g_register) | ||
1461 | ret=vfd->vidioc_g_register(file, fh, p); | 1463 | ret=vfd->vidioc_g_register(file, fh, p); |
1462 | break; | 1464 | break; |
1463 | } | 1465 | } |