diff options
| author | Tabrez Ahmed <tabreztalks@gmail.com> | 2026-03-07 17:22:26 +0530 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-03-30 19:45:06 -0700 |
| commit | 69694e9622118e546a735affc311ac8e652111d6 (patch) | |
| tree | 25adb51b0a063975be31bcf4ab22d409d82ef3e4 /tools/lib/python/kdoc/python_version.py | |
| parent | 4cd4489493531fce9046a135c6b99ce1abdb9053 (diff) | |
hwmon: (ads7871) Fix incorrect error code in voltage_show
The voltage_show() function returns -1 when the A/D conversion
fails to complete within the polling loop. -1 maps to -EPERM
(operation not permitted), which does not describe the actual
failure.
Replace this -1 error code with -ETIMEDOUT to better indicate
the timeout condition to userspace.
Drop the else block after return.
Note: not runtime tested due to lack of hardware.
Signed-off-by: Tabrez Ahmed <tabreztalks@gmail.com>
Link: https://lore.kernel.org/r/20260307115226.25757-1-tabreztalks@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
