diff options
author | Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com> | 2024-04-15 13:50:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-12 12:03:38 +0300 |
commit | d3ea59a95d67f849ca0e3d01255583edc8a70113 (patch) | |
tree | f48698444cf2ed9b2f390ba03ec4a838a5b32de2 /drivers/hwtracing | |
parent | 08ccc5d4d1bf8a12250c7961682c0d34843abe6c (diff) | |
download | linux-d3ea59a95d67f849ca0e3d01255583edc8a70113.tar.xz |
iio: pressure: dps310: support negative temperature values
[ Upstream commit 9dd6b32e76ff714308964cd9ec91466a343dcb8b ]
The current implementation interprets negative values returned from
`dps310_calculate_temp` as error codes.
This has a side effect that when negative temperature values are
calculated, they are interpreted as error.
Fix this by using the return value only for error handling and passing a
pointer for the value.
Fixes: ba6ec48e76bc ("iio: Add driver for Infineon DPS310")
Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Link: https://lore.kernel.org/r/20240415105030.1161770-2-thomas.haemmerle@leica-geosystems.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hwtracing')
0 files changed, 0 insertions, 0 deletions