summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/pm2fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/pm2fb.c')
-rw-r--r--drivers/video/fbdev/pm2fb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/fbdev/pm2fb.c b/drivers/video/fbdev/pm2fb.c
index 1dcf02e12..8ae010f07 100644
--- a/drivers/video/fbdev/pm2fb.c
+++ b/drivers/video/fbdev/pm2fb.c
@@ -616,6 +616,11 @@ static int pm2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
return -EINVAL;
}
+ if (!var->pixclock) {
+ DPRINTK("pixclock is zero\n");
+ return -EINVAL;
+ }
+
if (PICOS2KHZ(var->pixclock) > PM2_MAX_PIXCLOCK) {
DPRINTK("pixclock too high (%ldKHz)\n",
PICOS2KHZ(var->pixclock));