kernel/sysctl.c: remove duplicate UINT_MAX check on do_proc_douintvec_conv()
PATCH 36/51 kernel/sysctl.c: remove duplicate UINT_MAX check on do_proc_douintvec_conv()
From: "Luis R. Rodriguez" <[email protected]>
Subject: kernel/sysctl.c: remove duplicate UINT_MAX check on do_proc_douintvec_conv()
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
Fixes 4f2fec00afa60 ("sysctl: simplify unsigned int support")
Signed-off-by Luis R. Rodriguez <[email protected]>
Reported-by David Binderman <[email protected]>
Acked-by Kees Cook <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
kernel/sysctl.c | 2 -- 1 file changed, 2 deletions(-)
kernel/sysctl.c renamed from kernel/sysctl.c~sysctl-remove-duplicate-uint_max-check-on-do_proc_douintvec_conv +0 -2
@@ -2188,8 +2188,6 @@ static int do_proc_douintvec_conv(unsignif (write) {if (*lvalp >UINT_MAX )return -EINVAL ; -if (*lvalp >UINT_MAX ) -return -EINVAL ; *valp = *lvalp; }else {unsigned int val = *valp;
_