Re: [PATCH] iio: proximity: lidar: correct return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/12/15 04:56, Matt Ranostay wrote:
> 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 <mranostay@xxxxxxxxx>

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")

> ---
>  drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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)
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux