Commit 7080cead authored by luo penghao's avatar luo penghao Committed by Linus Torvalds

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.cnSigned-off-by: default avatarluo penghao <luo.penghao@zte.com.cn>
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 153ee1c4
...@@ -1053,7 +1053,6 @@ static int sysctl_follow_link(struct ctl_table_header **phead, ...@@ -1053,7 +1053,6 @@ static int sysctl_follow_link(struct ctl_table_header **phead,
struct ctl_dir *dir; struct ctl_dir *dir;
int ret; int ret;
ret = 0;
spin_lock(&sysctl_lock); spin_lock(&sysctl_lock);
root = (*pentry)->data; root = (*pentry)->data;
set = lookup_header_set(root); set = lookup_header_set(root);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment