summaryrefslogtreecommitdiff
path: root/fs/splice.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c
index c5e3c79b95a8..41179c0a655b 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -595,8 +595,10 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
}
res = kernel_readv(in, vec, spd.nr_pages, *ppos);
- if (res < 0)
+ if (res < 0) {
+ error = res;
goto err;
+ }
error = 0;
if (!res)