diff options
author | Marcus Folkesson <[email protected]> | 2023-03-10 08:50:35 +0100 |
---|---|---|
committer | Guenter Roeck <[email protected]> | 2023-03-12 11:13:25 -0700 |
commit | c93f5e2ab53243b17febabb9422a697017d3d49a (patch) | |
tree | 2f34cfb441686be16636a4f56fd29eebd3aae095 | |
parent | cb090e64cf25602b9adaf32d5dfc9c8bec493cd1 (diff) |
hwmon: (ina3221) return prober error code
ret is set to 0 which do not indicate an error.
Return -EINVAL instead.
Fixes: a9e9dd9c6de5 ("hwmon: (ina3221) Read channel input source info from DT")
Signed-off-by: Marcus Folkesson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
-rw-r--r-- | drivers/hwmon/ina3221.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c index e06186986444..f3a4c5633b1e 100644 --- a/drivers/hwmon/ina3221.c +++ b/drivers/hwmon/ina3221.c @@ -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]; |