OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb090e6
)
hwmon: (ina3221) return prober error code
author
Marcus Folkesson
<marcus.folkesson@gmail.com>
Fri, 10 Mar 2023 07:50:35 +0000
(08:50 +0100)
committer
Guenter Roeck
<linux@roeck-us.net>
Sun, 12 Mar 2023 18:13:25 +0000
(11:13 -0700)
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 <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>
drivers/hwmon/ina3221.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/ina3221.c
b/drivers/hwmon/ina3221.c
index
e061869
..
f3a4c56
100644
(file)
--- 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];