diff mbox

pvr2fb: test var->xoffset as bool?

Message ID 49738732.2020002@gmail.com (mailing list archive)
State Deferred
Delegated to: Paul Mundt
Headers show

Commit Message

Roel Kluin Jan. 18, 2009, 7:46 p.m. UTC
was this what was intended?
------------8<------------->8------------
Test for negative xoffset

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
--
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 mbox

Patch

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 {