mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 10:11:36 +00:00
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:
parent
2bb32e84a1
commit
d0a530441e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user