summaryrefslogtreecommitdiff
path: root/fs/read_write.c
diff options
context:
space:
mode:
authornixiaoming <nixiaoming@huawei.com>2018-07-22 11:37:08 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-10-18 08:42:49 +0300
commit55338ac2a9839557516b00661e6a05daf996fda0 (patch)
tree05dae4cbf78c273650e3c9f3b6d8ba20a23f4fe0 /fs/read_write.c
parentd65b1f20292425b798ec74e313a7ad3f11b8af0d (diff)
downloadlinux-55338ac2a9839557516b00661e6a05daf996fda0.tar.xz
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 <nixiaoming@huawei.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c1
1 files changed, 0 insertions, 1 deletions
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;