Skip to content

Commit c93f5e2

Browse files
marcusfolkessongroeck
authored andcommitted
hwmon: (ina3221) return prober error code
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]>
1 parent cb090e6 commit c93f5e2

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
@@ -772,7 +772,7 @@ static int ina3221_probe_child_from_dt(struct device *dev,
772772
return ret;
773773
} else if (val > INA3221_CHANNEL3) {
774774
dev_err(dev, "invalid reg %d of %pOFn\n", val, child);
775-
return ret;
775+
return -EINVAL;
776776
}
777777

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

0 commit comments

Comments
 (0)