aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-08-28 17:38:58 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-28 07:28:37 -0500
commit69d11262a3ff4c07e071523e6768ec15ccc147c1 (patch)
tree9f9a3863369746fe99ec2fc181a5bb8ef1b65324 /drivers/media
parentf887e99ae2210e23c9726b6f146938a84f6acc47 (diff)
[media] uvcvideo: Return -ENOTTY for unsupported ioctls
The proper error code is -ENOTTY instead of -EINVAL. This issue was found by the v4l2-compliance tool. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/uvc/uvc_v4l2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index b1aa55fb8984..bf9d07393139 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -932,7 +932,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
932 932
933 case VIDIOC_G_CROP: 933 case VIDIOC_G_CROP:
934 case VIDIOC_S_CROP: 934 case VIDIOC_S_CROP:
935 return -EINVAL; 935 return -ENOTTY;
936 936
937 /* Buffers & streaming */ 937 /* Buffers & streaming */
938 case VIDIOC_REQBUFS: 938 case VIDIOC_REQBUFS:
@@ -1038,7 +1038,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
1038 1038
1039 case VIDIOC_ENUMOUTPUT: 1039 case VIDIOC_ENUMOUTPUT:
1040 uvc_trace(UVC_TRACE_IOCTL, "Unsupported ioctl 0x%08x\n", cmd); 1040 uvc_trace(UVC_TRACE_IOCTL, "Unsupported ioctl 0x%08x\n", cmd);
1041 return -EINVAL; 1041 return -ENOTTY;
1042 1042
1043 case UVCIOC_CTRL_MAP: 1043 case UVCIOC_CTRL_MAP:
1044 return uvc_ioctl_ctrl_map(chain, arg); 1044 return uvc_ioctl_ctrl_map(chain, arg);