[libcamera-devel] [PATCH 2/4] pipeline: raspberrypi: return an error if setFormat() fails
Tomi Valkeinen
tomi.valkeinen at iki.fi
Thu Oct 22 10:17:29 CEST 2020
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;
/*
* See which streams are requested, and route the user
--
2.25.1
More information about the libcamera-devel
mailing list