Issue highlighted by smatch warning:
CHECK drivers/iio/adc/vf610_adc.c
drivers/iio/adc/vf610_adc.c:466 vf610_read_raw() warn: unsigned 'ret' is never less than zero.
As wait_for_completion_interruptible_timeout can return -ERESTARTSTSYS, if
interrupted, ret must be signed.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Fugang Duan <B38611@freescale.com>
{
struct vf610_adc *info = iio_priv(indio_dev);
unsigned int hc_cfg;
- unsigned long ret;
+ long ret;
switch (mask) {
case IIO_CHAN_INFO_RAW: