[PATCH] sysctl: remove duplicate UINT_MAX check on do_proc_douintvec_conv()

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

 



do_proc_douintvec_conv() has two UINT_MAX checks, we can remove one.
This has no functional changes other than fixing a compiler warning:

kernel/sysctl.c:2190]: (warning) Identical condition '*lvalp>UINT_MAX', second condition is always false

Reported-by: David Binderman <dcb314@xxxxxxxxxxx>
Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
---
 kernel/sysctl.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4c08ed4a379e..0da31bbbff18 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2181,8 +2181,6 @@ static int do_proc_douintvec_conv(unsigned long *lvalp,
 				  int write, void *data)
 {
 	if (write) {
-		if (*lvalp > UINT_MAX)
-			return -EINVAL;
 		if (*lvalp > UINT_MAX)
 			return -EINVAL;
 		*valp = *lvalp;
-- 
2.14.0




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