Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69d11262 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f887e99a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -932,7 +932,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)

	case VIDIOC_G_CROP:
	case VIDIOC_S_CROP:
		return -EINVAL;
		return -ENOTTY;

	/* Buffers & streaming */
	case VIDIOC_REQBUFS:
@@ -1038,7 +1038,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)

	case VIDIOC_ENUMOUTPUT:
		uvc_trace(UVC_TRACE_IOCTL, "Unsupported ioctl 0x%08x\n", cmd);
		return -EINVAL;
		return -ENOTTY;

	case UVCIOC_CTRL_MAP:
		return uvc_ioctl_ctrl_map(chain, arg);