diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-23 14:29:43 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-23 14:29:43 +0200 |
commit | 7706abf5a0eb4c082897fd2a17a0ac0898e39666 (patch) | |
tree | 982d22365f1aeedc43a796ef816cf1b1fa8480a7 /drivers/iio/pressure/zpa2326.c | |
parent | staging: vc04_services: Remove unnecessary braces (diff) | |
parent | Linux 4.14-rc6 (diff) | |
download | linux-7706abf5a0eb4c082897fd2a17a0ac0898e39666.tar.xz linux-7706abf5a0eb4c082897fd2a17a0ac0898e39666.zip |
Merge 4.14-rc6 into staging-next
We want the IIO and staging driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/pressure/zpa2326.c')
-rw-r--r-- | drivers/iio/pressure/zpa2326.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/iio/pressure/zpa2326.c b/drivers/iio/pressure/zpa2326.c index 78dfbde62028..81d8f24eaeb4 100644 --- a/drivers/iio/pressure/zpa2326.c +++ b/drivers/iio/pressure/zpa2326.c @@ -865,7 +865,6 @@ complete: static int zpa2326_wait_oneshot_completion(const struct iio_dev *indio_dev, struct zpa2326_private *private) { - int ret; unsigned int val; long timeout; @@ -887,14 +886,11 @@ static int zpa2326_wait_oneshot_completion(const struct iio_dev *indio_dev, /* Timed out. */ zpa2326_warn(indio_dev, "no one shot interrupt occurred (%ld)", timeout); - ret = -ETIME; - } else if (timeout < 0) { - zpa2326_warn(indio_dev, - "wait for one shot interrupt cancelled"); - ret = -ERESTARTSYS; + return -ETIME; } - return ret; + zpa2326_warn(indio_dev, "wait for one shot interrupt cancelled"); + return -ERESTARTSYS; } static int zpa2326_init_managed_irq(struct device *parent, |