iio: pressure: dps310: introduce consistent error handling
authorThomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Mon, 15 Apr 2024 10:50:28 +0000 (12:50 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 20 Apr 2024 13:53:02 +0000 (14:53 +0100)
commitb8189beb2c87cb7aae114734baf19d2bd33342ce
tree293e1e6f802f0d47d482c5b124e3f6849334dbba
parent9dd6b32e76ff714308964cd9ec91466a343dcb8b
iio: pressure: dps310: introduce consistent error handling

Align error handling with `dps310_calculate_temp`, where it's not
possible to differentiate between errors and valid calculations by
checking if the returned value is negative.

Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
Link: https://lore.kernel.org/r/20240415105030.1161770-3-thomas.haemmerle@leica-geosystems.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/dps310.c