From patchwork Fri Oct 16 18:23:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 54347 X-Patchwork-Delegate: tomi.valkeinen@nokia.com 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 n9GIE745001516 for ; Fri, 16 Oct 2009 18:14:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088AbZJPSOC (ORCPT ); Fri, 16 Oct 2009 14:14:02 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751963AbZJPSOC (ORCPT ); Fri, 16 Oct 2009 14:14:02 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]:42987 "EHLO mail-ew0-f208.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbZJPSOA (ORCPT ); Fri, 16 Oct 2009 14:14:00 -0400 Received: by ewy4 with SMTP id 4so1866733ewy.37 for ; Fri, 16 Oct 2009 11:14:04 -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=5LwJPC89VSJBQBI+yWnndr1lTjGGr4ZKM2ALIt4Ocr0=; b=IzWs1rQTVHuqozZ7ZpoCUiaxcsenNYLr1qO14vUDco71Y5TkHxHTVDFzEan2TDe+sf D7KsaiOLFvH/+dy0vgzDRFeGn0XNZRbG55DV8EZzKGTTaKXIK8+Lpwe3knXs1XgS1Rke T0fK6RgFszdoyn1QCvgOTG2DjR/GkwpkM9UQ8= 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=fEZUHRdQ++kJbdxdu3CGMZpDmjW0rJlpV0LI+woTxlZIMdudX1HNXLPUytD8C1+Neu +F0RNd5IAk5GvPPcTeWIA2ONmFpO9+A0ME7EO/YV0Qzf00kH5drbjLgqs8aazyK/+4oD nxopbLIDb6sw8JmsjnwPX7tQuFBb2hhZ9ONMo= Received: by 10.216.89.9 with SMTP id b9mr703997wef.61.1255716844369; Fri, 16 Oct 2009 11:14:04 -0700 (PDT) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 7sm2310620eyg.6.2009.10.16.11.14.03 (version=SSLv3 cipher=RC4-MD5); Fri, 16 Oct 2009 11:14:03 -0700 (PDT) Message-ID: <4AD8BA2F.9090307@gmail.com> Date: Fri, 16 Oct 2009 20:23:43 +0200 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-2.7.b4.fc11 Thunderbird/3.0b4 MIME-Version: 1.0 To: Imre Deak , linux-fbdev-devel@lists.sourceforge.net, linux-omap@vger.kernel.org, Andrew Morton Subject: [PATCH] omapfb: Wrong test on unsigned? Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index 0d0c8c8..cc7dd93 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c @@ -286,7 +286,7 @@ static int _setcolreg(struct fb_info *info, u_int regno, u_int red, u_int green, if (r != 0) break; - if (regno < 0) { + if ((int)regno < 0) { r = -EINVAL; break; }