aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/extres
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2020-06-16 20:41:59 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2020-06-16 20:41:59 +0000
commitb5863da9094ed1f6a6ffcf010223b584eab42b7e (patch)
treea3aef30311f9e99d5b3682a33639d2ed31270f2e /sys/dev/extres
parent602810b5f557fecbf38003662f2dc4abe933a59b (diff)
Notes
Diffstat (limited to 'sys/dev/extres')
-rw-r--r--sys/dev/extres/regulator/regulator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/extres/regulator/regulator.c b/sys/dev/extres/regulator/regulator.c
index f5ca5d1240dc..7d74df2ada43 100644
--- a/sys/dev/extres/regulator/regulator.c
+++ b/sys/dev/extres/regulator/regulator.c
@@ -295,8 +295,9 @@ static int
regnode_method_get_voltage(struct regnode *regnode, int *uvolt)
{
- return (regnode->std_param.min_uvolt +
- (regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2);
+ *uvolt = regnode->std_param.min_uvolt +
+ (regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2;
+ return (0);
}
int