Skip to contentSkip to conversation

pvr2fb: test var->xoffset as bool?

PATCH New Roel Kluin 1 participant 1 message Jan 18, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 pvr2fb: test var->xoffset as bool?

was this what was intended?
------------8<------------->8------------
Test for negative xoffset

---

drivers/video/pvr2fb.c +1 -1
index 0a0fd48..5869e6c 100644
@@ -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 {