Message ID | 20200314235728.15495-7-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
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@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@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@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
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,
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@ideasonboard.com> --- src/libcamera/camera.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)