summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/kyro/fbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/kyro/fbdev.c')
-rw-r--r--drivers/video/fbdev/kyro/fbdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c
index 25801e8e3f74..d57772f96ad2 100644
--- a/drivers/video/fbdev/kyro/fbdev.c
+++ b/drivers/video/fbdev/kyro/fbdev.c
@@ -494,6 +494,8 @@ static int kyrofb_set_par(struct fb_info *info)
info->var.hsync_len +
info->var.left_margin)) / 1000;
+ if (!lineclock)
+ return -EINVAL;
/* time for a frame in ns (precision in 32bpp) */
frameclock = lineclock * (info->var.yres +