Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

luo penghao and committed by
Linus Torvalds
7080cead 153ee1c4

-1
-1
fs/proc/proc_sysctl.c
··· 1053 1053 struct ctl_dir *dir; 1054 1054 int ret; 1055 1055 1056 - ret = 0; 1057 1056 spin_lock(&sysctl_lock); 1058 1057 root = (*pentry)->data; 1059 1058 set = lookup_header_set(root);