[libcamera-devel] [PATCH 6/9] libcamera: camera: Propagate error value from importFrameBuffer
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sun Mar 15 00:57:25 CET 2020
The PipelineHandler::importFrameBuffer() function, called by
Camera::start() may return an error, but its return value is ignored.
Propagate it to the caller to fix this.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/camera.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 63b1f7729937..9c432adb1d97 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -931,8 +931,10 @@ int Camera::start()
if (allocator_ && !allocator_->buffers(stream).empty())
continue;
- p_->pipe_->invokeMethod(&PipelineHandler::importFrameBuffers,
- ConnectionTypeDirect, this, stream);
+ ret = p_->pipe_->invokeMethod(&PipelineHandler::importFrameBuffers,
+ ConnectionTypeDirect, this, stream);
+ if (ret < 0)
+ return ret;
}
ret = p_->pipe_->invokeMethod(&PipelineHandler::start,
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list