mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
hwmon: (ina3221) return prober error code
[ Upstream commitc93f5e2ab5
] ret is set to 0 which do not indicate an error. Return -EINVAL instead. Fixes:a9e9dd9c6d
("hwmon: (ina3221) Read channel input source info from DT") Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20230310075035.246083-1-marcus.folkesson@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7091951c2c
commit
9cc4aa40b5
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user