diff options
| author | Matti Vaittinen <mazziesaccount@gmail.com> | 2026-08-10 10:52:47 +0300 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-08-31 00:52:41 +0100 |
| commit | b0e951ffc5a28141a106562997ca136ec6a0e1a3 (patch) | |
| tree | 8e6c90c8e180d61ef9fac03e047da468bcfedc6e | |
| parent | 55671fbc3d12ae1f381842433567fcb7ff96a298 (diff) | |
| download | linux-next-b0e951ffc5a28141a106562997ca136ec6a0e1a3.tar.gz linux-next-b0e951ffc5a28141a106562997ca136ec6a0e1a3.zip | |
iio: pressure: rohm-bm1390: Return error when read fails
The data reading function ignores the cached error value, and
unconditionally returns 0. Return cached 'ret' -value after stopping
the measurement so user knows if read failed and data is garbage.
Fixes: 534674463a59 ("iio: bm1390: simplify using guard(mutex)")
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
| -rw-r--r-- | drivers/iio/pressure/rohm-bm1390.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/pressure/rohm-bm1390.c b/drivers/iio/pressure/rohm-bm1390.c index 57941fb4a535..f9deb48e6a41 100644 --- a/drivers/iio/pressure/rohm-bm1390.c +++ b/drivers/iio/pressure/rohm-bm1390.c @@ -289,7 +289,7 @@ static int bm1390_read_data(struct bm1390_data *data, if (warn) dev_warn(data->dev, "Failed to stop measurement (%d)\n", warn); - return 0; + return ret; } static int bm1390_read_raw(struct iio_dev *idev, |
