Skip to content

Commit

Permalink
iio:adc:vf610 ensure correct handing of interruption of wait for comp…
Browse files Browse the repository at this point in the history
…letion

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 <[email protected]>
Acked-by: Fugang Duan <[email protected]>
  • Loading branch information
jic23 committed Mar 2, 2014
1 parent bdc8cda commit db8fa73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/vf610_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit db8fa73

Please sign in to comment.