diff --git a/[refs] b/[refs] index 9ccdce44735a..4d51cec5a248 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 19d06eff4e0d77fc1a15c92f845f1916e2d10dd0 +refs/heads/master: 7e533705bd973267c488f8c3a7c7246ecad3a414 diff --git a/trunk/drivers/video/sm501fb.c b/trunk/drivers/video/sm501fb.c index f49287c88abe..742b5c656d66 100644 --- a/trunk/drivers/video/sm501fb.c +++ b/trunk/drivers/video/sm501fb.c @@ -237,12 +237,14 @@ static int sm501fb_check_var(struct fb_var_screeninfo *var, /* check we can fit these values into the registers */ - if (var->hsync_len > 255 || var->vsync_len > 255) + if (var->hsync_len > 255 || var->vsync_len > 63) return -EINVAL; - if ((var->xres + var->right_margin) >= 4096) + /* hdisplay end and hsync start */ + if ((var->xres + var->right_margin) > 4096) return -EINVAL; + /* vdisplay end and vsync start */ if ((var->yres + var->lower_margin) > 2048) return -EINVAL;