hwmon: (ina3221) return prober error code
PATCH 1/1 hwmon: (ina3221) return prober error code
ret is set to 0 which do not indicate an error.
Return -EINVAL instead.
Signed-off-by Marcus Folkesson <[email protected]>
--- drivers/hwmon/ina3221.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/ina3221.c +1 -1
@@ -772,7 +772,7 @@ static int ina3221_probe_child_from_dt(struct device *dev,return ret; }else if (val >INA3221_CHANNEL3 ) {dev_err (dev,"invalid reg %d of %pOFn\n" , val, child); -return ret; +return -EINVAL ; } input = &ina->inputs[val];
Signature · 1 line
2.39.2
Quoted 4 lines · Marcus Folkesson
ret is set to 0 which do not indicate an error.
Return-EINVALinstead.Signed-off-by Marcus Folkesson <[email protected]>
Applied.
Thanks,
Guenter
Quoted 17 lines
--- drivers/hwmon/ina3221.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/ina3221.c +1
-1@@ -772,7 +772,7 @@ static int ina3221_probe_child_from_dt(struct device *dev,return ret; }else if (val >INA3221_CHANNEL3 ) {dev_err (dev,"invalid reg %d of %pOFn\n" , val, child); -return ret; +return -EINVAL ; } input = &ina->inputs[val];