提交 9979e320 编写于 作者: M Matt Ranostay 提交者: 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: NMatt Ranostay <mranostay@gmail.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册