From patchwork Sat Oct 27 20:41:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1656331 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 75F1CDFAC4 for ; Sat, 27 Oct 2012 20:42:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752378Ab2J0UmZ (ORCPT ); Sat, 27 Oct 2012 16:42:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34907 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756362Ab2J0UmU (ORCPT ); Sat, 27 Oct 2012 16:42:20 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9RKgKgI006347 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 27 Oct 2012 16:42:20 -0400 Received: from pedra (vpn1-4-98.gru2.redhat.com [10.97.4.98]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9RKg8Ip002354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Oct 2012 16:42:20 -0400 Received: from v4l by pedra with local (Exim 4.76) (envelope-from ) id 1TSDCI-0007bu-RL; Sat, 27 Oct 2012 18:41:34 -0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List Subject: [PATCH 59/68] [media] s2255drv: index is always positive Date: Sat, 27 Oct 2012 18:41:17 -0200 Message-Id: <1351370486-29040-60-git-send-email-mchehab@redhat.com> In-Reply-To: <1351370486-29040-1-git-send-email-mchehab@redhat.com> References: <1351370486-29040-1-git-send-email-mchehab@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org drivers/media/usb/s2255/s2255drv.c:1654:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/s2255/s2255drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index 2191f6d..8ebec0d 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -1651,7 +1651,7 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv, int is_ntsc = 0; #define NUM_FRAME_ENUMS 4 int frm_dec[NUM_FRAME_ENUMS] = {1, 2, 3, 5}; - if (fe->index < 0 || fe->index >= NUM_FRAME_ENUMS) + if (fe->index >= NUM_FRAME_ENUMS) return -EINVAL; switch (fe->width) { case 640: