From cbd64859e6c1509b0f2ee7728cb66b120d52c45e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 15 Nov 2012 11:53:21 +0100 Subject: videoout: Return a negative error code in vo_queue_buffer() Most functions return 0 on success and a negative error code otherwise, make vo_queue_buffer() conform with that. Signed-off-by: Laurent Pinchart --- videoout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/videoout.c b/videoout.c index 51279e3..51bed8b 100644 --- a/videoout.c +++ b/videoout.c @@ -228,13 +228,13 @@ int vo_queue_buffer(struct videoout *vo, struct v4l2_video_buffer *buffer) if (vo->queued[buffer->index]) { fprintf(stderr, "buffer already queued\n"); - return 0; + return -EBUSY; } ret = v4l2_queue_buffer(vo->dev, buffer); if (ret < 0) { perror("VIDIOC_QBUF\n"); - return 0; + return ret; } vo->queued[buffer->index] = 1; @@ -250,5 +250,5 @@ int vo_queue_buffer(struct videoout *vo, struct v4l2_video_buffer *buffer) vo->ops->watch_fd(vo->dev->fd); vo->num_queued++; - return 1; + return 0; } -- cgit v1.2.3