Commit db8fa731 authored by Jonathan Cameron's avatar Jonathan Cameron

iio:adc:vf610 ensure correct handing of interruption of wait for completion

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: default avatarJonathan Cameron <jic23@kernel.org>
Acked-by: default avatarFugang Duan <B38611@freescale.com>
parent bdc8cda1
......@@ -447,7 +447,7 @@ static int vf610_read_raw(struct iio_dev *indio_dev,
{
struct vf610_adc *info = iio_priv(indio_dev);
unsigned int hc_cfg;
unsigned long ret;
long ret;
switch (mask) {
case IIO_CHAN_INFO_RAW:
......
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