From patchwork Fri Nov 16 06:50:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12884 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9FFD623E13 for ; Fri, 16 Nov 2012 06:57:02 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 15C8FA19CCF for ; Fri, 16 Nov 2012 06:57:01 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so3064408iej.11 for ; Thu, 15 Nov 2012 22:57:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=zMk+cXQu4UHpZfWcTSzOTsLl7B94dO5fDUpCa7q4s2M=; b=WlR/nK0Ug9k22YEn4Nf5dkQXFE6HriBwj+IrXiGp1tvb9U1VMieqnwKqYXV7ZR2Oer tt1uQaosdbT4237pyacm9vUVa28yGDLYV1wihRQ20TTVf9vN96t7t9roJauR960K2paW cfZIAuax/Z1KecoDmELstkXP/pj/5EkBmAVBz3od/SUxlNXU6TXU+yPwYGx6SXWx/fjW Hv1sCkEKvJ/HdWls+jt/wJvLlGfwqDqFuorjq1Bsjhd3gYUcqRPwLfMuGzhGw2hFiONq 1fSBkOQvIS2FWhtTN8dbAUt/Ag7H9UmoHW+duxWM0si92JPyKKjYpD5DN7zjcUDEOox2 o6pw== Received: by 10.50.213.69 with SMTP id nq5mr1690895igc.70.1353049021845; Thu, 15 Nov 2012 22:57:01 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp23317igt; Thu, 15 Nov 2012 22:57:01 -0800 (PST) Received: by 10.68.242.9 with SMTP id wm9mr12284182pbc.7.1353049021292; Thu, 15 Nov 2012 22:57:01 -0800 (PST) Received: from mail-da0-f53.google.com (mail-da0-f53.google.com [209.85.210.53]) by mx.google.com with ESMTPS id zo3si1481422pbc.270.2012.11.15.22.57.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:01 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.53 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.210.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.53 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-da0-f53.google.com with SMTP id g9so1223213dad.26 for ; Thu, 15 Nov 2012 22:57:01 -0800 (PST) Received: by 10.68.203.72 with SMTP id ko8mr6421107pbc.78.1353049021030; Thu, 15 Nov 2012 22:57:01 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz10sm753915pbc.37.2012.11.15.22.56.58 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:00 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Mauro Carvalho Chehab , ivtv-devel@ivtvdriver.org, linux-media@vger.kernel.org Subject: [PATCH 01/14] [media] ivtv: Remove redundant check on unsigned variable Date: Fri, 16 Nov 2012 12:20:33 +0530 Message-Id: <1353048646-10935-2-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353048646-10935-1-git-send-email-tushar.behera@linaro.org> References: <1353048646-10935-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQnUS/Uy0wIRB9af360mQJGCWkAeDPfCvWJV70aIGbtnntrvVz2CrDrNUMjDd85WddIGxyy/ No need to check whether unsigned variable is less than 0. CC: Mauro Carvalho Chehab CC: ivtv-devel@ivtvdriver.org CC: linux-media@vger.kernel.org Signed-off-by: Tushar Behera --- drivers/media/pci/ivtv/ivtv-ioctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 949ae23..4b47b5c 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -993,7 +993,7 @@ int ivtv_s_input(struct file *file, void *fh, unsigned int inp) v4l2_std_id std; int i; - if (inp < 0 || inp >= itv->nof_inputs) + if (inp >= itv->nof_inputs) return -EINVAL; if (inp == itv->active_input) {