提交 d0a53044 编写于 作者: M Michael Hennerich 提交者: Greg Kroah-Hartman

staging: iio: iio_ring_rip_outer return immediately if rip_lots returns <= 0

Acked-by: NJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 2bb32e84
...@@ -105,7 +105,7 @@ static ssize_t iio_ring_rip_outer(struct file *filp, char __user *buf, ...@@ -105,7 +105,7 @@ static ssize_t iio_ring_rip_outer(struct file *filp, char __user *buf,
return -EINVAL; return -EINVAL;
copied = rb->access.rip_lots(rb, count, &data, &dead_offset); copied = rb->access.rip_lots(rb, count, &data, &dead_offset);
if (copied < 0) { if (copied <= 0) {
ret = copied; ret = copied;
goto error_ret; goto error_ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册