mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
iio: adc: max1027: fix error code in max1027_wait_eoc()
Return -ETIMEDOUT on timeout instead of success.
Fixes: 1f7b4048b3
("iio: adc: max1027: Use the EOC IRQ when populated for single reads")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
d7a83bc38d
commit
2021ef0609
@ -287,7 +287,7 @@ static int max1027_wait_eoc(struct iio_dev *indio_dev)
|
||||
msecs_to_jiffies(1000));
|
||||
reinit_completion(&st->complete);
|
||||
if (!ret)
|
||||
return ret;
|
||||
return -ETIMEDOUT;
|
||||
} else {
|
||||
if (indio_dev->active_scan_mask)
|
||||
conversion_time *= hweight32(*indio_dev->active_scan_mask);
|
||||
|
Loading…
Reference in New Issue
Block a user