media: media-request: return -EINVAL for invalid request_fds

Instead of returning -ENOENT when a request_fd was not found (VIDIOC_QBUF
and VIDIOC_G/S/TRY_EXT_CTRLS), we now return -EINVAL. This is in line
with what we do when invalid dmabuf fds are passed to e.g. VIDIOC_QBUF.

Also document that EINVAL is returned for invalid m.fd values, we never
documented that.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Hans Verkuil
2018-08-23 06:14:12 -04:00
committed by Mauro Carvalho Chehab
parent 757fdb51c1
commit 34b4147246
5 changed files with 20 additions and 22 deletions

View File

@@ -313,8 +313,8 @@ struct v4l2_buffer
queued to that request. This is set by the user when calling
:ref:`ioctl VIDIOC_QBUF <VIDIOC_QBUF>` and ignored by other ioctls.
If the device does not support requests, then ``EPERM`` will be returned.
If requests are supported but an invalid request FD is given, then
``ENOENT`` will be returned.
If requests are supported but an invalid request file descriptor is
given, then ``EINVAL`` will be returned.