aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2017-10-03 19:16:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-03 20:54:25 -0400
commit3181c38e4df257852a0c0a53552fd5c869402886 (patch)
treee5c9627f0076360195b96820ce87bc25fa608318
parent7240767450d6d8380fb153e2998a1bb4ede7b029 (diff)
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") Link: http://lkml.kernel.org/r/20170919072918.12066-1-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> Reported-by: David Binderman <dcb314@hotmail.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/sysctl.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 423554ad3610..4da9e622471f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2188,8 +2188,6 @@ static int do_proc_douintvec_conv(unsigned long *lvalp,
2188 if (write) { 2188 if (write) {
2189 if (*lvalp > UINT_MAX) 2189 if (*lvalp > UINT_MAX)
2190 return -EINVAL; 2190 return -EINVAL;
2191 if (*lvalp > UINT_MAX)
2192 return -EINVAL;
2193 *valp = *lvalp; 2191 *valp = *lvalp;
2194 } else { 2192 } else {
2195 unsigned int val = *valp; 2193 unsigned int val = *valp;