diff options
author | Jonathan Cameron <jic23@kernel.org> | 2014-01-03 17:02:00 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-03-02 16:45:28 -0500 |
commit | db8fa7311d1ce642134c53e175ca0ae35e021344 (patch) | |
tree | 353fe58930f0fa92f65dbdc0f8855697680965a7 /drivers/iio/adc/vf610_adc.c | |
parent | bdc8cda1d010887c06bd8c29564b74cd61ec0a7b (diff) |
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: Jonathan Cameron <jic23@kernel.org>
Acked-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'drivers/iio/adc/vf610_adc.c')
-rw-r--r-- | drivers/iio/adc/vf610_adc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c index 37f542e8233c..44799eb5930e 100644 --- a/drivers/iio/adc/vf610_adc.c +++ b/drivers/iio/adc/vf610_adc.c | |||
@@ -447,7 +447,7 @@ static int vf610_read_raw(struct iio_dev *indio_dev, | |||
447 | { | 447 | { |
448 | struct vf610_adc *info = iio_priv(indio_dev); | 448 | struct vf610_adc *info = iio_priv(indio_dev); |
449 | unsigned int hc_cfg; | 449 | unsigned int hc_cfg; |
450 | unsigned long ret; | 450 | long ret; |
451 | 451 | ||
452 | switch (mask) { | 452 | switch (mask) { |
453 | case IIO_CHAN_INFO_RAW: | 453 | case IIO_CHAN_INFO_RAW: |