From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: akpm@linux-foundation.org, keescook@chromium.org
Cc: dcb314@hotmail.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Luis R. Rodriguez" <mcgrof@kernel.org>
Subject: [PATCH] sysctl: remove duplicate UINT_MAX check on do_proc_douintvec_conv()
Date: Tue, 19 Sep 2017 00:29:18 -0700 [thread overview]
Message-ID: <20170919072918.12066-1-mcgrof@kernel.org> (raw)
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@hotmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
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
next reply other threads:[~2017-09-19 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 7:29 Luis R. Rodriguez [this message]
2017-09-19 21:52 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170919072918.12066-1-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dcb314@hotmail.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome