| Message ID | 20261029114125.152164-1-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
This is a good idea indeed On Thu, Oct 29, 2026 at 12:41:25PM +0100, Barnabás Pőcze wrote: > Propagate the return value from `AwbAlgorithmBase::init()` instead > of silently ignoring it. > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > --- > src/ipa/libipa/awb.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h > index ef9e78b1e8..9952556f4c 100644 > --- a/src/ipa/libipa/awb.h > +++ b/src/ipa/libipa/awb.h > @@ -115,7 +115,9 @@ class AwbAlgorithm : public AwbAlgorithmBase > public: > int init(const ValueNode &tuningData, ControlInfoMap::Map &controls) > { > - AwbAlgorithmBase::init(tuningData); > + int ret = AwbAlgorithmBase::init(tuningData); > + if (ret) > + return ret; > > gainMin_ = std::max(Q::TraitsType::min, 1.0f); > gainMax_ = Q::TraitsType::max; > -- > 2.56.0 >
Quoting Barnabás Pőcze (2026-10-29 11:41:25) > Propagate the return value from `AwbAlgorithmBase::init()` instead > of silently ignoring it. > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> As I think this is what I just hit and it causes a crash otherwise this will definitely be better. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > src/ipa/libipa/awb.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h > index ef9e78b1e8..9952556f4c 100644 > --- a/src/ipa/libipa/awb.h > +++ b/src/ipa/libipa/awb.h > @@ -115,7 +115,9 @@ class AwbAlgorithm : public AwbAlgorithmBase > public: > int init(const ValueNode &tuningData, ControlInfoMap::Map &controls) > { > - AwbAlgorithmBase::init(tuningData); > + int ret = AwbAlgorithmBase::init(tuningData); > + if (ret) > + return ret; > > gainMin_ = std::max(Q::TraitsType::min, 1.0f); > gainMax_ = Q::TraitsType::max; > -- > 2.56.0 >
diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h index ef9e78b1e8..9952556f4c 100644 --- a/src/ipa/libipa/awb.h +++ b/src/ipa/libipa/awb.h @@ -115,7 +115,9 @@ class AwbAlgorithm : public AwbAlgorithmBase public: int init(const ValueNode &tuningData, ControlInfoMap::Map &controls) { - AwbAlgorithmBase::init(tuningData); + int ret = AwbAlgorithmBase::init(tuningData); + if (ret) + return ret; gainMin_ = std::max(Q::TraitsType::min, 1.0f); gainMax_ = Q::TraitsType::max;
Propagate the return value from `AwbAlgorithmBase::init()` instead of silently ignoring it. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/ipa/libipa/awb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)