diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2010-10-07 13:27:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-07 10:06:18 -0700 |
commit | d0a530441ea9f2f10172c7f31a007f6b23d3fc19 (patch) | |
tree | e72c448c69e5b1151a1f8f537bcb8fc026e1993e /drivers/staging/iio/industrialio-ring.c | |
parent | 2bb32e84a17fab547c7a746c7888e846c9cd88cc (diff) | |
download | op-kernel-dev-d0a530441ea9f2f10172c7f31a007f6b23d3fc19.zip op-kernel-dev-d0a530441ea9f2f10172c7f31a007f6b23d3fc19.tar.gz |
staging: iio: iio_ring_rip_outer return immediately if rip_lots returns <= 0
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/industrialio-ring.c')
-rw-r--r-- | drivers/staging/iio/industrialio-ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/industrialio-ring.c b/drivers/staging/iio/industrialio-ring.c index edcf6be..d393ace 100644 --- a/drivers/staging/iio/industrialio-ring.c +++ b/drivers/staging/iio/industrialio-ring.c @@ -105,7 +105,7 @@ static ssize_t iio_ring_rip_outer(struct file *filp, char __user *buf, return -EINVAL; copied = rb->access.rip_lots(rb, count, &data, &dead_offset); - if (copied < 0) { + if (copied <= 0) { ret = copied; goto error_ret; } |