Commit 9979e320 authored by Matt Ranostay's avatar Matt Ranostay Committed by Jonathan Cameron

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: 366e6563 ("iio: proximity: lidar: optimize i2c transactions")
Signed-off-by: default avatarMatt Ranostay <mranostay@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 02c34ccc
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment