Skip to content

Commit ebd17f4

Browse files
marcusfolkessonSasha Levin
authored andcommitted
hwmon: (ina3221) return prober error code
[ Upstream commit c93f5e2 ] ret is set to 0 which do not indicate an error. Return -EINVAL instead. Fixes: a9e9dd9 ("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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 2f032a9 commit ebd17f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/ina3221.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ static int ina3221_probe_child_from_dt(struct device *dev,
672672
return ret;
673673
} else if (val > INA3221_CHANNEL3) {
674674
dev_err(dev, "invalid reg %d of %pOFn\n", val, child);
675-
return ret;
675+
return -EINVAL;
676676
}
677677

678678
input = &ina->inputs[val];

0 commit comments

Comments
 (0)