regulator: fix regnode_method_get_voltage

This method is supposed to write the voltage into uvolt
and return an errno compatible value.

Reviewed by:	mmel
Differential Revision:	https://reviews.freebsd.org/D23006
This commit is contained in:
Emmanuel Vadot 2020-01-08 11:30:42 +00:00
parent 546652fbe3
commit 650a41c6d0

View File

@ -275,8 +275,9 @@ static int
regnode_method_get_voltage(struct regnode *regnode, int *uvolt) regnode_method_get_voltage(struct regnode *regnode, int *uvolt)
{ {
return (regnode->std_param.min_uvolt + *uvolt = regnode->std_param.min_uvolt +
(regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2); (regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2;
return (0);
} }
int int