mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
gbefb: unsigned var->pixclock cannot be less than 0
unsigned var->pixclock cannot be less than 0 Signed-off-by: Roel Kluin <[email protected]> Cc: Krzysztof Helt <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
08cc6341cc
commit
6405141fb3
1 changed files with 5 additions and 2 deletions
|
|
@ -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)
|
||||
return(-EINVAL);
|
||||
ret = compute_gbe_timing(var, &timing);
|
||||
var->pixclock = ret;
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
|
||||
/* Adjust virtual resolution, if necessary */
|
||||
if (var->xres > var->xres_virtual || (!ywrap && !ypan))
|
||||
|
|
|
|||
Loading…
Reference in a new issue