summaryrefslogtreecommitdiff
path: root/drivers/regulator/of_regulator.c
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2019-09-10 21:22:29 +0200
committerMark Brown <broonie@kernel.org>2019-09-11 11:17:23 +0100
commitc82f27df07573ec7b124efe176d2ac6c038787a5 (patch)
treeeb65f38fa76dc9613f7395d8f9424b061e876d2f /drivers/regulator/of_regulator.c
parent5eda8e95b7922cb9dd1343f7beece3cd78565216 (diff)
regulator: core: Fix error return for /sys access
regulator_uV_show() is missing error handling if regulator_get_voltage_rdev() returns negative values. Instead it prints the errno as a string, e.g. -EINVAL as "-22" which could be interpreted as -22 µV. We also do not need to hold the lock while converting the integer to a string. Reported-by: Adam Ford <aford173@gmail.com> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Tested-by: Adam Ford <aford173@gmail.com> Link: https://lore.kernel.org/r/f37f2a1276efcb34cf3b7f1a25481175be048806.1568143348.git.hns@goldelico.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/of_regulator.c')
0 files changed, 0 insertions, 0 deletions