diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-07-26 02:36:38 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-07-28 13:47:50 +0300 |
commit | 735f0ffeaac736f91c35774e575b1280ba868d69 (patch) | |
tree | cce1f93a65029a6faed34d8a7993b5ecae175577 /src/ipa/raspberrypi/controller/rpi/geq.cpp | |
parent | 0821497ddd70a748e4758ecac3536fb73ed0c81c (diff) |
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Tested-by: Naushir Patuck <naush@raspberrypi.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/geq.cpp')
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/geq.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<uint16_t>("offset", 0); config_.slope = params.get<double>("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")); |