diff mbox series

[09/55] sysctl: remove redundant ret assignment

Message ID 20220120020809.QepbJ2Fov%akpm@linux-foundation.org (mailing list archive)
State New
Headers show
Series [01/55] mm: percpu: generalize percpu related config | expand

Commit Message

Andrew Morton Jan. 20, 2022, 2:08 a.m. UTC
From: luo penghao <luo.penghao@zte.com.cn>
Subject: 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>
---

 fs/proc/proc_sysctl.c |    1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

--- a/fs/proc/proc_sysctl.c~sysctl-remove-redundant-ret-assignment
+++ a/fs/proc/proc_sysctl.c
@@ -1053,7 +1053,6 @@  static int sysctl_follow_link(struct ctl
 	struct ctl_dir *dir;
 	int ret;
 
-	ret = 0;
 	spin_lock(&sysctl_lock);
 	root = (*pentry)->data;
 	set = lookup_header_set(root);