[PATCH linux] sysctl: Remove redundant ret assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: luo penghao <luo.penghao@xxxxxxxxxx>

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

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: luo penghao <luo.penghao@xxxxxxxxxx>
---
 fs/proc/proc_sysctl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 5d66fae..30d74b8 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);
-- 
2.15.2





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux