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/dpc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ipa/raspberrypi/controller/rpi/dpc.cpp') diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp index be014a05..def39bb7 100644 --- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp @@ -34,8 +34,10 @@ char const *Dpc::name() const int Dpc::read(boost::property_tree::ptree const ¶ms) { config_.strength = params.get("strength", 1); - if (config_.strength < 0 || config_.strength > 2) - LOG(RPiDpc, Fatal) << "Dpc: bad strength value"; + if (config_.strength < 0 || config_.strength > 2) { + LOG(RPiDpc, Error) << "bad strength value"; + return -EINVAL; + } return 0; } -- cgit v1.2.1