From 55338ac2a9839557516b00661e6a05daf996fda0 Mon Sep 17 00:00:00 2001 From: nixiaoming Date: Sun, 22 Jul 2018 16:37:08 +0800 Subject: Delete invalid assignment statements in do_sendfile Assigning value -EINVAL to "retval" here, but that stored value is overwritten before it can be used. retval = -EINVAL; .... retval = rw_verify_area(WRITE, out.file, &out_pos, count); value_overwrite: Overwriting previous write to "retval" with value from rw_verify_area delete invalid assignment statements Signed-off-by: n00202754 Signed-off-by: Al Viro --- fs/read_write.c | 1 - 1 file changed, 1 deletion(-) (limited to 'fs/read_write.c') diff --git a/fs/read_write.c b/fs/read_write.c index c734bc2880a5..7f79b1fc490e 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1407,7 +1407,6 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, goto fput_in; if (!(out.file->f_mode & FMODE_WRITE)) goto fput_out; - retval = -EINVAL; in_inode = file_inode(in.file); out_inode = file_inode(out.file); out_pos = out.file->f_pos; -- cgit v1.2.3-55-g7522