From patchwork Sun Apr 26 15:45:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 20019 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3QFjVgw030777 for ; Sun, 26 Apr 2009 15:45:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752134AbZDZPpK (ORCPT ); Sun, 26 Apr 2009 11:45:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752148AbZDZPpK (ORCPT ); Sun, 26 Apr 2009 11:45:10 -0400 Received: from mail-ew0-f176.google.com ([209.85.219.176]:50397 "EHLO mail-ew0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752134AbZDZPpJ (ORCPT ); Sun, 26 Apr 2009 11:45:09 -0400 Received: by ewy24 with SMTP id 24so1755256ewy.37 for ; Sun, 26 Apr 2009 08:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=Qc23tpmqod42OE3S+8S08V70SoA2ufeqxIDrDJLKn1o=; b=J2UUXRkQGOGqDEvqvNdVGzwXLgVZj3b5PW2JljX1Ha4z7Y0SbrOZDp/gTlLD6D29HJ HcH0Hi8oFydLv3wVi3/yD8l03bWtGBU6NIOT2Xgyk+E2CzLOjhFLwA9w6w84j0xic7CY /VS785EhmhWexK5Ta6InYIKdOyi2Pt/F3c7k0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=Ic9H3JkgyxwCJnrIW6XA8YmimsiRWbjZ8P8wDBUZlyGk9VpxxQRk9qnLA2+nvcIQ6Q 65McGGtF0UZzkcxoPs6odSq6xt1WoP5uJ5FWn/dR6ht4/Shu/LqhJjeN+hT7gkce5bGZ Zr6HLWpD9+XpX3iGfKxDIIfq6PDL5kaQU2p4w= Received: by 10.210.30.10 with SMTP id d10mr3663091ebd.51.1240760706327; Sun, 26 Apr 2009 08:45:06 -0700 (PDT) Received: from ?192.168.1.115? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 10sm4947823eyd.42.2009.04.26.08.45.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 26 Apr 2009 08:45:06 -0700 (PDT) Message-ID: <49F48183.50302@gmail.com> Date: Sun, 26 Apr 2009 17:45:07 +0200 From: Roel Kluin User-Agent: Thunderbird 2.0.0.21 (X11/20090302) MIME-Version: 1.0 To: mjpeg-users@lists.sourceforge.net, linux-media@vger.kernel.org, Andrew Morton Subject: [PATCH] zoran: invalid test on unsigned Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org fmt->index is unsigned. test doesn't work Signed-off-by: Roel Kluin Acked-by: Trent Piepho --- Is there another test required? -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c index 092333b..0db5d0f 100644 --- a/drivers/media/video/zoran/zoran_driver.c +++ b/drivers/media/video/zoran/zoran_driver.c @@ -1871,7 +1871,7 @@ static int zoran_enum_fmt(struct zoran *zr, struct v4l2_fmtdesc *fmt, int flag) if (num == fmt->index) break; } - if (fmt->index < 0 /* late, but not too late */ || i == NUM_FORMATS) + if (i == NUM_FORMATS) return -EINVAL; strncpy(fmt->description, zoran_formats[i].name, sizeof(fmt->description)-1);