diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 3717d893..66346728 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -149,7 +149,7 @@ private:
 	void updateControls(const IPACameraSensorInfo &sensorInfo,
 			    const ControlInfoMap &sensorControls,
 			    ControlInfoMap *ipaControls);
-	void updateSessionConfiguration(const ControlInfoMap &sensorControls);
+	int updateSessionConfiguration(const ControlInfoMap &sensorControls);
 	void processControls(unsigned int frame, const ControlList &controls);
 	void fillParams(unsigned int frame, ipu3_uapi_params *params);
 	void parseStatistics(unsigned int frame,
@@ -180,18 +180,33 @@ private:
  * \brief Compute IPASessionConfiguration using the sensor information and the
  * sensor V4L2 controls
  */
-void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)
+int IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)
 {
-	const ControlInfo vBlank = sensorControls.find(V4L2_CID_VBLANK)->second;
-	context_.configuration.sensor.defVBlank = vBlank.def().get<int32_t>();
+	const auto itVBlank = sensorControls.find(V4L2_CID_VBLANK);
+	if (itVBlank == sensorControls.end()) {
+		LOG(IPAIPU3, Error) << "Can't find vblank control";
+		return -EINVAL;
+	}
 
-	const ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;
-	int32_t minExposure = v4l2Exposure.min().get<int32_t>();
-	int32_t maxExposure = v4l2Exposure.max().get<int32_t>();
+	context_.configuration.sensor.defVBlank = itVBlank->second.def().get<int32_t>();
+
+	const auto itExp = sensorControls.find(V4L2_CID_EXPOSURE);
+	if (itExp == sensorControls.end()) {
+		LOG(IPAIPU3, Error) << "Can't find exposure control";
+		return -EINVAL;
+	}
+
+	int32_t minExposure = itExp->second.min().get<int32_t>();
+	int32_t maxExposure = itExp->second.max().get<int32_t>();
 
-	const ControlInfo &v4l2Gain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN)->second;
-	int32_t minGain = v4l2Gain.min().get<int32_t>();
-	int32_t maxGain = v4l2Gain.max().get<int32_t>();
+	const auto itGain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN);
+	if (itGain == sensorControls.end()) {
+		LOG(IPAIPU3, Error) << "Can't find analogue gain control";
+		return -EINVAL;
+	}
+
+	int32_t minGain = itGain->second.min().get<int32_t>();
+	int32_t maxGain = itGain->second.max().get<int32_t>();
 
 	/*
 	 * When the AGC computes the new exposure values for a frame, it needs
@@ -204,6 +219,8 @@ void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)
 	context_.configuration.agc.maxShutterSpeed = maxExposure * context_.configuration.sensor.lineDuration;
 	context_.configuration.agc.minAnalogueGain = camHelper_->gain(minGain);
 	context_.configuration.agc.maxAnalogueGain = camHelper_->gain(maxGain);
+
+	return 0;
 }
 
 /**
@@ -437,10 +454,13 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo,
 	updateControls(sensorInfo_, sensorCtrls_, ipaControls);
 
 	/* Update the IPASessionConfiguration using the sensor settings. */
-	updateSessionConfiguration(sensorCtrls_);
+	int ret = updateSessionConfiguration(sensorCtrls_);
+	if (ret < 0)
+		return ret;
+
 
 	for (auto const &algo : algorithms_) {
-		int ret = algo->configure(context_, configInfo);
+		ret = algo->configure(context_, configInfo);
 		if (ret)
 			return ret;
 	}
