summaryrefslogtreecommitdiff
path: root/drivers/media/media-request.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-09-01 14:29:14 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-11 16:57:29 +0300
commit15cd442e79e2a60a725ee5501e4ffb537698c802 (patch)
tree3a4b0356ca704fe66095ffeca6b9dc9a4be8c512 /drivers/media/media-request.c
parentffda0b4c2481b2a0faf634abccb1da0d0ba4eddb (diff)
downloadlinux-15cd442e79e2a60a725ee5501e4ffb537698c802.tar.xz
media: media-request: EPERM -> EACCES/EBUSY
If requests are not supported by the driver, then return EACCES, not EPERM. If you attempt to mix queueing buffers directly and using requests, then EBUSY is returned instead of EPERM: once a specific queueing mode has been chosen the queue is 'busy' if you attempt the other mode (i.e. direct queueing vs via a request). Signed-off-by: Hans Verkuil <hans.verkuil@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>
Diffstat (limited to 'drivers/media/media-request.c')
-rw-r--r--drivers/media/media-request.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/media-request.c b/drivers/media/media-request.c
index 414197645e09..4e9db1fed697 100644
--- a/drivers/media/media-request.c
+++ b/drivers/media/media-request.c
@@ -249,7 +249,7 @@ media_request_get_by_fd(struct media_device *mdev, int request_fd)
if (!mdev || !mdev->ops ||
!mdev->ops->req_validate || !mdev->ops->req_queue)
- return ERR_PTR(-EPERM);
+ return ERR_PTR(-EACCES);
filp = fget(request_fd);
if (!filp)
@@ -405,7 +405,7 @@ int media_request_object_bind(struct media_request *req,
int ret = -EBUSY;
if (WARN_ON(!ops->release))
- return -EPERM;
+ return -EACCES;
spin_lock_irqsave(&req->lock, flags);