diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-07-18 09:02:18 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-07-22 18:33:38 +0200 |
commit | 507397d19b5a296aa339f7a1bd16284f668a1906 (patch) | |
tree | d40d87465cdb86fde995621fe51ff9954b051daf /mm | |
parent | dt-bindings: iio: adi,ad74115: remove ref from -nanoamp (diff) | |
download | linux-507397d19b5a296aa339f7a1bd16284f668a1906.tar.xz linux-507397d19b5a296aa339f7a1bd16284f668a1906.zip |
iio: frequency: admv1013: propagate errors from regulator_get_voltage()
The regulator_get_voltage() function returns negative error codes.
This function saves it to an unsigned int and then does some range
checking and, since the error code falls outside the correct range,
it returns -EINVAL.
Beyond the messiness, this is bad because the regulator_get_voltage()
function can return -EPROBE_DEFER and it's important to propagate that
back properly so it can be handled.
Fixes: da35a7b526d9 ("iio: frequency: admv1013: add support for ADMV1013")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ce75aac3-2aba-4435-8419-02e59fdd862b@moroto.mountain
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions