diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-09-01 07:29:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-11 09:57:29 -0400 |
commit | 15cd442e79e2a60a725ee5501e4ffb537698c802 (patch) | |
tree | 3a4b0356ca704fe66095ffeca6b9dc9a4be8c512 /drivers/media/common/videobuf2/videobuf2-core.c | |
parent | ffda0b4c2481b2a0faf634abccb1da0d0ba4eddb (diff) | |
download | linux-15cd442e79e2a60a725ee5501e4ffb537698c802.tar.bz2 |
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/common/videobuf2/videobuf2-core.c')
-rw-r--r-- | drivers/media/common/videobuf2/videobuf2-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index 2dc3fc935f87..cb86b02afd4a 100644 --- a/drivers/media/common/videobuf2/videobuf2-core.c +++ b/drivers/media/common/videobuf2/videobuf2-core.c @@ -1495,7 +1495,7 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb, (!req && vb->state != VB2_BUF_STATE_IN_REQUEST && q->uses_requests)) { dprintk(1, "queue in wrong mode (qbuf vs requests)\n"); - return -EPERM; + return -EBUSY; } if (req) { |