summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/dpc.cpp
diff options
context:
space:
mode:
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;
}