Skip to content

Commit

Permalink
staging: iio: iio_ring_rip_outer return immediately if rip_lots retur…
Browse files Browse the repository at this point in the history
…ns <= 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>
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Oct 7, 2010
1 parent 2bb32e8 commit d0a5304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/industrialio-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d0a5304

Please sign in to comment.