summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <mranostay@gmail.com>2015-12-26 20:56:30 -0800
committerJonathan Cameron <jic23@kernel.org>2016-01-03 17:54:08 +0000
commit9979e320b559264333a77c73131ae88cefca15e5 (patch)
tree38591004a2cd55065a3ac635ddd031d475818cf8
parent02c34ccc1d2d528d2de2897881b97933363432b5 (diff)
downloadop-kernel-dev-9979e320b559264333a77c73131ae88cefca15e5.zip
op-kernel-dev-9979e320b559264333a77c73131ae88cefca15e5.tar.gz
iio: proximity: lidar: correct return value
lidar_i2c_xfer() function was never a non-positive value on error, and this correct that with a -EIO return code. Fixes: 366e65633cf4 ("iio: proximity: lidar: optimize i2c transactions") Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/proximity/pulsedlight-lidar-lite-v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
index 93e29fb..db35e04 100644
--- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
+++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
@@ -87,7 +87,7 @@ static int lidar_i2c_xfer(struct lidar_data *data, u8 reg, u8 *val, int len)
ret = i2c_transfer(client->adapter, msg, 2);
- return (ret == 2) ? 0 : ret;
+ return (ret == 2) ? 0 : -EIO;
}
static int lidar_smbus_xfer(struct lidar_data *data, u8 reg, u8 *val, int len)
OpenPOWER on IntegriCloud