summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/dpc.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-26 02:36:38 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-28 13:47:50 +0300
commit735f0ffeaac736f91c35774e575b1280ba868d69 (patch)
treecce1f93a65029a6faed34d8a7993b5ecae175577 /src/ipa/raspberrypi/controller/rpi/dpc.cpp
parent0821497ddd70a748e4758ecac3536fb73ed0c81c (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/dpc.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/dpc.cpp6
1 files changed, 4 insertions, 2 deletions
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 &params)
{
config_.strength = params.get<int>("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;
}