svn commit: r362243 - stable/12/sys/dev/extres/regulator

Emmanuel Vadot manu at FreeBSD.org
Tue Jun 16 20:42:00 UTC 2020


Author: manu
Date: Tue Jun 16 20:41:59 2020
New Revision: 362243
URL: https://svnweb.freebsd.org/changeset/base/362243

Log:
  MFC r356487:
  
  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

Modified:
  stable/12/sys/dev/extres/regulator/regulator.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/extres/regulator/regulator.c
==============================================================================
--- stable/12/sys/dev/extres/regulator/regulator.c	Tue Jun 16 20:38:55 2020	(r362242)
+++ stable/12/sys/dev/extres/regulator/regulator.c	Tue Jun 16 20:41:59 2020	(r362243)
@@ -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


More information about the svn-src-stable mailing list