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>
This commit is contained in:
Michael Hennerich 2010-10-07 13:27:37 +02:00 committed by Greg Kroah-Hartman
parent 2bb32e84a1
commit d0a530441e

View File

@ -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;
}