DORMANTno replies

[PATCH] gbefb: unsigned var->pixclock cannot be less than 0

From: roel kluin <hidden>
Date: 2008-10-29 21:30:00
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

unsigned var->pixclock cannot be less than 0

Signed-off-by: Roel Kluin <redacted>
---
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index f89c3cc..a386443 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -912,6 +912,7 @@ static int gbefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
 {
 	unsigned int line_length;
 	struct gbe_timing_info timing;
+	int ret;
 
 	/* Limit bpp to 8, 16, and 32 */
 	if (var->bits_per_pixel <= 8)
@@ -930,8 +931,10 @@ static int gbefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
 
 	var->grayscale = 0;	/* No grayscale for now */
 
-	if ((var->pixclock = compute_gbe_timing(var, &timing)) < 0)
+	ret = compute_gbe_timing(var, &timing);
+	if (ret < 0)
 		return(-EINVAL);
+	var->pixclock = ret;
 
 	/* Adjust virtual resolution, if necessary */
 	if (var->xres > var->xres_virtual || (!ywrap && !ypan))


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help