From patchwork Fri Nov 16 06:50:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12887 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 742C423E13 for ; Fri, 16 Nov 2012 06:57:12 +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 B2843A19391 for ; Fri, 16 Nov 2012 06:57:11 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so3064408iej.11 for ; Thu, 15 Nov 2012 22:57:11 -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=M015NC3vHx2IDHajZhDxw73vUiMqqIY5wiVfHFGZh4Q=; b=XvJgtpwHPyjmxXU74nXoPKMFhUGKK2P+kQerMObhzCiR1yfbjzVQ5OLc/5/zlqK9Bd fkjVEyQU+4ZMBqDtKUWGjSMGQGSJdBOHNI5lpydTZ9nGJ0vONWHtFZQm6qcLPsDQgXHH gkr2gpzjpGdFSRkisPyB5gxAQqFkkb/H6b/dtXBe7/NPX884TvSYHhJCKJ/+7seu59zw Kmnu+NehsybnMRBlCaxWfvXPPP4tFil+FeYUwvTVuIsfdYQMw3+k9LTEyg55eVZha0fD +5P4IZxIQ3+1emCqjEIy8AFNlSY56QtHOUzjpVSXEiBtTP9cSgyV/5igUvHiwz3GrGuM IwHg== Received: by 10.50.213.34 with SMTP id np2mr2231995igc.57.1353049031316; Thu, 15 Nov 2012 22:57:11 -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 n20csp23337igt; Thu, 15 Nov 2012 22:57:11 -0800 (PST) Received: by 10.66.73.65 with SMTP id j1mr10130459pav.68.1353049030814; Thu, 15 Nov 2012 22:57:10 -0800 (PST) Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by mx.google.com with ESMTPS id h9si1160939paw.105.2012.11.15.22.57.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:10 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.47 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.47; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.47 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-pb0-f47.google.com with SMTP id un1so314075pbc.34 for ; Thu, 15 Nov 2012 22:57:10 -0800 (PST) Received: by 10.68.189.233 with SMTP id gl9mr11908808pbc.166.1353049030549; Thu, 15 Nov 2012 22:57:10 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz10sm753915pbc.37.2012.11.15.22.57.07 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:09 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 04/14] [media] tlg2300: Remove redundant check on unsigned variable Date: Fri, 16 Nov 2012 12:20:36 +0530 Message-Id: <1353048646-10935-5-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: ALoCoQmD059kZdY4NZ8kE7j6kXQRXY0jc9DcaYaUJNyBvt4KeN2KffKUa9RtX/RZJzWohCdZoVzY No need to check whether unsigned variable is less than 0. CC: Mauro Carvalho Chehab CC: linux-media@vger.kernel.org Signed-off-by: Tushar Behera --- drivers/media/usb/tlg2300/pd-video.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/usb/tlg2300/pd-video.c b/drivers/media/usb/tlg2300/pd-video.c index 1f448ac..dd157e7 100644 --- a/drivers/media/usb/tlg2300/pd-video.c +++ b/drivers/media/usb/tlg2300/pd-video.c @@ -923,7 +923,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int i) struct poseidon *pd = front->pd; s32 ret, cmd_status; - if (i < 0 || i >= POSEIDON_INPUTS) + if (i >= POSEIDON_INPUTS) return -EINVAL; ret = send_set_req(pd, SGNL_SRC_SEL, pd_inputs[i].tlg_src, &cmd_status);