summaryrefslogtreecommitdiffstats
path: root/drivers/video/s3fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/s3fb.c')
-rw-r--r--drivers/video/s3fb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index d117358..a96ac43 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -403,8 +403,13 @@ static int s3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
/* Find appropriate format */
rv = svga_match_format (s3fb_formats, var, NULL);
- if ((rv < 0) || ((par->chip == CHIP_988_VIRGE_VX) ? (rv == 7) : (rv == 6)))
- { /* 24bpp on VIRGE VX, 32bpp on others */
+
+ /* 32bpp mode is not supported on VIRGE VX,
+ 24bpp is not supported on others */
+ if ((par->chip == CHIP_988_VIRGE_VX) ? (rv == 7) : (rv == 6))
+ rv = -EINVAL;
+
+ if (rv < 0) {
printk(KERN_ERR "fb%d: unsupported mode requested\n", info->node);
return rv;
}
OpenPOWER on IntegriCloud