Skip to content
Commit 463d714a authored by Thomas Haemmerle's avatar Thomas Haemmerle Committed by Greg Kroah-Hartman
Browse files

iio: pressure: dps310: support negative temperature values



[ Upstream commit 9dd6b32e ]

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: ba6ec48e ("iio: Add driver for Infineon DPS310")
Signed-off-by: default avatarThomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Link: https://lore.kernel.org/r/20240415105030.1161770-2-thomas.haemmerle@leica-geosystems.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c0e9a728
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment