diff options
author | luo penghao <luo.penghao@zte.com.cn> | 2022-01-20 05:08:09 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-20 09:52:52 +0300 |
commit | 7080cead5d45b79ec0c86fa285cf9b6abc413ed8 (patch) | |
tree | 622cb507cb5653d47d6b28e6326cab6a0e59919c /fs | |
parent | 153ee1c41a3ec707438ae0ca6b0061f72de334ef (diff) | |
download | linux-7080cead5d45b79ec0c86fa285cf9b6abc413ed8.tar.xz |
sysctl: remove redundant ret assignment
Subsequent if judgments will assign new values to ret, so the statement
here should be deleted
The clang_analyzer complains as follows:
fs/proc/proc_sysctl.c:
Value stored to 'ret' is never read
Link: https://lkml.kernel.org/r/20211230063622.586360-1-luo.penghao@zte.com.cn
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
Reported-by: Zeal Robot <zealci@zte.com.cn>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/proc_sysctl.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 4f6168ec5079..389e1e42e7d9 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -1053,7 +1053,6 @@ static int sysctl_follow_link(struct ctl_table_header **phead, struct ctl_dir *dir; int ret; - ret = 0; spin_lock(&sysctl_lock); root = (*pentry)->data; set = lookup_header_set(root); |