iio: proximity: lidar: correct return value
PATCH 1/1 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.
Signed-off-by Matt Ranostay <[email protected]>
--- drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +1 -1
@@ -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)
Signature · 1 line
2.6.4
Jonathan Cameron
maintainerQuoted 4 lines · Matt Ranostay
lidar_i2c_xfer()function was never a non-positive value on error, and this correct that with a-EIOreturn code.Signed-off-by Matt Ranostay <[email protected]>
Hmm. Awkward timing on this one. I'll create a temporary fix branch for post the merge window closing and send it on to Greg when appropriate.
This patch could have done with a fixes tag to avoid me having to look up when this problem was introduced i.e.
Fixes 366e65633cf4 ("iio: proximity: lidar: optimize i2c transactions")
Quoted 18 lines
--- drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +1
-1@@ -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)