[libcamera-devel] [PATCH 2/4] pipeline: raspberrypi: return an error if setFormat() fails

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Oct 22 11:49:57 CEST 2020


Hi Tomi,

On 22/10/2020 09:17, Tomi Valkeinen wrote:
> The method calls setFormat(), stores the return value, but then does not
> do anything with the return value. I presume it is meant to fail and
> return the error.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at iki.fi>

Indeed, it looks that way to me.

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index dd62dfc7..aa8d9340 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -586,6 +586,8 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
>  	 * because of flips in the sensor.
>  	 */
>  	ret = data->isp_[Isp::Input].dev()->setFormat(&sensorFormat);
> +	if (ret)
> +		return ret;
>  
>  	/*
>  	 * See which streams are requested, and route the user
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list