You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
splice: fix error return code
fs/splice.c: In function 'default_file_splice_read': fs/splice.c:566: warning: 'error' may be used uninitialized in this function which is sort-of true. The code will in fact return -ENOMEM instead of the kernel_readv() return value. Cc: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
committed by
Jens Axboe
parent
4f23122858
commit
77f6bf57ba
+3
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user