summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/path.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2023-05-03 11:58:17 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-05-13 17:54:58 +0100
commit24febc99ca725dcf42d57168a2f4e8a75a5ade92 (patch)
treea94f461cf6cfa85e1c54c3ede2bc3248976bc9f8 /drivers/thunderbolt/path.c
parenta551c26e8e568fad42120843521529241b9bceec (diff)
downloadlinux-stable-24febc99ca725dcf42d57168a2f4e8a75a5ade92.tar.gz
linux-stable-24febc99ca725dcf42d57168a2f4e8a75a5ade92.tar.bz2
linux-stable-24febc99ca725dcf42d57168a2f4e8a75a5ade92.zip
iio: addac: ad74413: fix resistance input processing
On success, ad74413r_get_single_adc_result() returns IIO_VAL_INT aka 1. So currently, the IIO_CHAN_INFO_PROCESSED case is effectively equivalent to the IIO_CHAN_INFO_RAW case, and we never call ad74413r_adc_to_resistance_result() to convert the adc measurement to ohms. Check ret for being negative rather than non-zero. Fixes: fea251b6a5dbd (iio: addac: add AD74413R driver) Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230503095817.452551-1-linux@rasmusvillemoes.dk Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/thunderbolt/path.c')
0 files changed, 0 insertions, 0 deletions