From: luo penghao Date: Thu, 20 Jan 2022 02:08:09 +0000 (-0800) Subject: sysctl: remove redundant ret assignment X-Git-Tag: v5.17-rc1~38^2~46 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7080cead5d45b79ec0c86fa285cf9b6abc413ed8;p=linux-2.6-block.git 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 Reported-by: Zeal Robot Acked-by: Luis Chamberlain Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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);