diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-01-20 13:24:50 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-01-22 18:46:00 +0200 |
commit | ce2ea24fb46f924bda14721c7cee0d2e4ea0d74f (patch) | |
tree | e6ce88cd1a6aae47315e83bf488dec24731236e9 /src/libcamera/framebuffer_allocator.cpp | |
parent | 667f53b522d6181ca3794e0d45d52bc1b069a513 (diff) |
libcamera: Fix documentation of buffer allocation/export functions
The V4L2VideoDevice::exportBuffers(),
PipelineHandler::exportFrameBuffers() and
FrameBufferAllocator::allocate() functions all return the number of
allocated buffers on success, but are documented as returning 0 in that
case. Fix their documentation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/framebuffer_allocator.cpp')
-rw-r--r-- | src/libcamera/framebuffer_allocator.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp index a7588c7f..c772b516 100644 --- a/src/libcamera/framebuffer_allocator.cpp +++ b/src/libcamera/framebuffer_allocator.cpp @@ -108,7 +108,8 @@ FrameBufferAllocator::~FrameBufferAllocator() * Upon successful allocation, the allocated buffers can be retrieved with the * buffers() method. * - * \return 0 on success or a negative error code otherwise + * \return The number of allocated buffers on success or a negative error code + * otherwise * \retval -EACCES The camera is not in a state where buffers can be allocated * \retval -EINVAL The \a stream does not belong to the camera or the stream is * not part of the active camera configuration @@ -140,12 +141,8 @@ int FrameBufferAllocator::allocate(Stream *stream) return -EBUSY; } - int ret = camera_->pipe_->exportFrameBuffers(camera_.get(), stream, - &buffers_[stream]); - if (ret) - return ret; - - return 0; + return camera_->pipe_->exportFrameBuffers(camera_.get(), stream, + &buffers_[stream]); } /** |