From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751411AbdISH3W (ORCPT ); Tue, 19 Sep 2017 03:29:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:42126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747AbdISH3V (ORCPT ); Tue, 19 Sep 2017 03:29:21 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC52E218F8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mcgrof@kernel.org From: "Luis R. Rodriguez" 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" Subject: [PATCH] sysctl: remove duplicate UINT_MAX check on do_proc_douintvec_conv() Date: Tue, 19 Sep 2017 00:29:18 -0700 Message-Id: <20170919072918.12066-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.13.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Luis R. Rodriguez --- 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