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

Naushir Patuck naush at raspberrypi.com
Thu Oct 22 10:38:09 CEST 2020


Hi Tomi,

Thank you for your patch.

On Thu, 22 Oct 2020 at 09:17, Tomi Valkeinen <tomi.valkeinen at iki.fi> 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>
> ---
>  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;
>

Looks good to me.
Reviewed-by: Naushir Patuck <naush at raspberrypi.com>


>
>         /*
>          * See which streams are requested, and route the user
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20201022/5d56b2c2/attachment.htm>


More information about the libcamera-devel mailing list