From 7973efcbc03132facdd5dde91074277f63e1c151 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 22 Oct 2020 11:17:29 +0300 Subject: pipeline: raspberrypi: return an error if setFormat() fails 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 Reviewed-by: Naushir Patuck Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- 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 a48013d8..0a60442c 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -593,6 +593,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 -- cgit v1.2.1