summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/asiliantfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/asiliantfb.c')
-rw-r--r--drivers/video/fbdev/asiliantfb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/fbdev/asiliantfb.c b/drivers/video/fbdev/asiliantfb.c
index 3e006da47752..84c56f525889 100644
--- a/drivers/video/fbdev/asiliantfb.c
+++ b/drivers/video/fbdev/asiliantfb.c
@@ -227,6 +227,9 @@ static int asiliantfb_check_var(struct fb_var_screeninfo *var,
{
unsigned long Ftarget, ratio, remainder;
+ if (!var->pixclock)
+ return -EINVAL;
+
ratio = 1000000 / var->pixclock;
remainder = 1000000 % var->pixclock;
Ftarget = 1000000 * ratio + (1000000 * remainder) / var->pixclock;