summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/tgafb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/tgafb.c')
-rw-r--r--drivers/video/fbdev/tgafb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/fbdev/tgafb.c b/drivers/video/fbdev/tgafb.c
index 65ba99215..9d2912947 100644
--- a/drivers/video/fbdev/tgafb.c
+++ b/drivers/video/fbdev/tgafb.c
@@ -166,6 +166,9 @@ tgafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{
struct tga_par *par = (struct tga_par *)info->par;
+ if (!var->pixclock)
+ return -EINVAL;
+
if (par->tga_type == TGA_TYPE_8PLANE) {
if (var->bits_per_pixel != 8)
return -EINVAL;