summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorPawel Osciak <pawel@osciak.com>2011-03-20 18:17:34 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 04:55:07 -0300
commit4ffabdb35ad59fdb8cb6ad3ff4733694ff0dfc35 (patch)
tree36ad1bc445c2b52f6f98e98a3b964dc7503baffc /drivers/media
parent950720840f392075b19d902e5ca7806a17a562cb (diff)
[media] vb2: vb2_poll() fix return values for file I/O mode
poll() should be returning poll-specific error values, not E* errors. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/videobuf2-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c
index ce032255f3e..8c6f04bc4d8 100644
--- a/drivers/media/video/videobuf2-core.c
+++ b/drivers/media/video/videobuf2-core.c
@@ -1364,18 +1364,18 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait)
struct vb2_buffer *vb = NULL;
/*
- * Start file io emulator if streaming api has not been used yet.
+ * Start file I/O emulator only if streaming API has not been used yet.
*/
if (q->num_buffers == 0 && q->fileio == NULL) {
if (!V4L2_TYPE_IS_OUTPUT(q->type) && (q->io_modes & VB2_READ)) {
ret = __vb2_init_fileio(q, 1);
if (ret)
- return ret;
+ return POLLERR;
}
if (V4L2_TYPE_IS_OUTPUT(q->type) && (q->io_modes & VB2_WRITE)) {
ret = __vb2_init_fileio(q, 0);
if (ret)
- return ret;
+ return POLLERR;
/*
* Write to OUTPUT queue can be done immediately.
*/