From 7d8604128ab0f11da459fdb43fd8366620afe7f5 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 15 Mar 2020 00:37:17 +0200 Subject: libcamera: camera: Propagate error value from importFrameBuffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Niklas Söderlund --- src/libcamera/camera.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libcamera/camera.cpp') diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 63b1f772..9c432adb 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, -- cgit v1.2.1