From d0a530441ea9f2f10172c7f31a007f6b23d3fc19 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Thu, 7 Oct 2010 13:27:37 +0200 Subject: [PATCH] staging: iio: iio_ring_rip_outer return immediately if rip_lots returns <= 0 Acked-by: Jonathan Cameron Signed-off-by: Michael Hennerich Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/industrialio-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/industrialio-ring.c b/drivers/staging/iio/industrialio-ring.c index edcf6be99ccb..d393ace0b41b 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; } -- 2.39.5