From 735f0ffeaac736f91c35774e575b1280ba868d69 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 26 Jul 2022 02:36:38 +0300 Subject: ipa: raspberrypi: Replace Fatal log by error propagation Replace the Fatal log messages that cause an abort during tuning data read with Error messages and proper error propagation to the caller. Signed-off-by: Laurent Pinchart Reviewed-by: Naushir Patuck Tested-by: Naushir Patuck --- src/ipa/raspberrypi/controller/rpi/geq.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ipa/raspberrypi/controller/rpi/geq.cpp') diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp index a7444787..106f0a40 100644 --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp @@ -39,8 +39,10 @@ int Geq::read(boost::property_tree::ptree const ¶ms) { config_.offset = params.get("offset", 0); config_.slope = params.get("slope", 0.0); - if (config_.slope < 0.0 || config_.slope >= 1.0) - LOG(RPiGeq, Fatal) << "Geq: bad slope value"; + if (config_.slope < 0.0 || config_.slope >= 1.0) { + LOG(RPiGeq, Error) << "Bad slope value"; + return -EINVAL; + } if (params.get_child_optional("strength")) { int ret = config_.strength.read(params.get_child("strength")); -- cgit v1.2.1