[libcamera-devel] [PATCH 6/9] libcamera: camera: Propagate error value from importFrameBuffer
Niklas Söderlund
niklas.soderlund at ragnatech.se
Mon Mar 16 16:38:29 CET 2020
Hi Laurent,
Thanks for your work.
On 2020-03-15 01:57:25 +0200, Laurent Pinchart wrote:
> 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>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> 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
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list