From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755396AbbIHQXR (ORCPT ); Tue, 8 Sep 2015 12:23:17 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:33642 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754697AbbIHQXP (ORCPT ); Tue, 8 Sep 2015 12:23:15 -0400 From: Sudip Mukherjee To: Oleg Drokin , Andreas Dilger , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org, Sudip Mukherjee Subject: [PATCH 2/2] staging: lustre: lov: remove always false condition Date: Tue, 8 Sep 2015 21:53:02 +0530 Message-Id: <1441729382-27865-2-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441729382-27865-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1441729382-27865-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The member qc_idx of struct if_quotactl is unsigned and hence it can never be less than zero. Signed-off-by: Sudip Mukherjee --- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 2a2fd8d..906503b 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -1487,7 +1487,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, struct obd_quotactl *oqctl; if (qctl->qc_valid == QC_OSTIDX) { - if (qctl->qc_idx < 0 || count <= qctl->qc_idx) + if (count <= qctl->qc_idx) return -EINVAL; tgt = lov->lov_tgts[qctl->qc_idx]; -- 1.9.1