diff options
Diffstat (limited to 'drivers/video/gbefb.c')
-rw-r--r-- | drivers/video/gbefb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index f89c3cce1e0c..fe5b519860b1 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) | |||
912 | { | 912 | { |
913 | unsigned int line_length; | 913 | unsigned int line_length; |
914 | struct gbe_timing_info timing; | 914 | struct gbe_timing_info timing; |
915 | int ret; | ||
915 | 916 | ||
916 | /* Limit bpp to 8, 16, and 32 */ | 917 | /* Limit bpp to 8, 16, and 32 */ |
917 | if (var->bits_per_pixel <= 8) | 918 | if (var->bits_per_pixel <= 8) |
@@ -930,8 +931,10 @@ static int gbefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
930 | 931 | ||
931 | var->grayscale = 0; /* No grayscale for now */ | 932 | var->grayscale = 0; /* No grayscale for now */ |
932 | 933 | ||
933 | if ((var->pixclock = compute_gbe_timing(var, &timing)) < 0) | 934 | ret = compute_gbe_timing(var, &timing); |
934 | return(-EINVAL); | 935 | var->pixclock = ret; |
936 | if (ret < 0) | ||
937 | return -EINVAL; | ||
935 | 938 | ||
936 | /* Adjust virtual resolution, if necessary */ | 939 | /* Adjust virtual resolution, if necessary */ |
937 | if (var->xres > var->xres_virtual || (!ywrap && !ypan)) | 940 | if (var->xres > var->xres_virtual || (!ywrap && !ypan)) |