From patchwork Sun Jan 18 19:46:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 3053 X-Patchwork-Delegate: lethal@linux-sh.org 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 n0IJmd6H028235 for ; Sun, 18 Jan 2009 11:48:39 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752120AbZARTxD (ORCPT ); Sun, 18 Jan 2009 14:53:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753918AbZARTxC (ORCPT ); Sun, 18 Jan 2009 14:53:02 -0500 Received: from ey-out-2122.google.com ([74.125.78.25]:10454 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752120AbZARTxA (ORCPT ); Sun, 18 Jan 2009 14:53:00 -0500 Received: by ey-out-2122.google.com with SMTP id 22so455168eye.37 for ; Sun, 18 Jan 2009 11:52:58 -0800 (PST) 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:cc:subject:content-type :content-transfer-encoding; bh=+vHSu94kyVq+gKFCYh/b09duvoMSDlLx2FUsVEfYwyg=; b=qPnftRXD41jSQIT3xA5D2UrdZEh5pPJ0rPoQPsDVppsOfTcxuaoTrLuFVxHbB29Xb2 THCfOyPhWua1cHbVrcfXHERNSvmz4dIjz+MJTU3MvnDejR6dzv1okW22DY64Mz6lK6EH s6QosCYrnvzZb4w3fG08bieUFEXK8vCOuhwI0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=XMBGtT7lTBQuQKZ3vQJt0cn5Y2SZavfemOp32p8v1ugY79jLxM7x2C5JIDyR/v9YkT whZlFYraoD14MPeY7Erj1Csi5rJKBQ8mLPLhcE3tJDterblaWpRFwGJW+QaZ352mJLpM NlRRiHvtN58ebIghKmCcJtdFCqcVlCXdkf51g= Received: by 10.210.19.7 with SMTP id 7mr489588ebs.29.1232308017712; Sun, 18 Jan 2009 11:46:57 -0800 (PST) Received: from ?192.168.1.115? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id i3sm11986458nfh.40.2009.01.18.11.46.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 18 Jan 2009 11:46:57 -0800 (PST) Message-ID: <49738732.2020002@gmail.com> Date: Sun, 18 Jan 2009 20:46:58 +0100 From: Roel Kluin User-Agent: Thunderbird 2.0.0.18 (X11/20081105) MIME-Version: 1.0 To: Paul Mundt CC: linux-sh@vger.kernel.org Subject: [PATCH] pvr2fb: test var->xoffset as bool? Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org was this what was intended? ------------8<------------->8------------ Test for negative xoffset Signed-off-by: Roel Kluin --- -- To unsubscribe from this list: send the line "unsubscribe linux-sh" 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/video/pvr2fb.c b/drivers/video/pvr2fb.c index 0a0fd48..5869e6c 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c @@ -460,7 +460,7 @@ static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) set_color_bitfields(var); if (var->vmode & FB_VMODE_YWRAP) { - if (var->xoffset || var->yoffset < 0 || + if (var->xoffset < 0 || var->yoffset < 0 || var->yoffset >= var->yres_virtual) { var->xoffset = var->yoffset = 0; } else {