]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/video/sh_mobile_lcdcfb.c
Merge branches 'irq-core-for-linus' and 'core-locking-for-linus' of git://git.kernel...
[karo-tx-linux.git] / drivers / video / sh_mobile_lcdcfb.c
index a777cb99739ca193ce236f1460d886ccad54728b..50963739a40977832e03285b1049be65f4cde1dd 100644 (file)
@@ -919,7 +919,7 @@ static int sh_mobile_check_var(struct fb_var_screeninfo *var, struct fb_info *in
            var->right_margin < 12 || var->right_margin > 240 ||
            var->upper_margin < 12 || var->upper_margin > 120 ||
            var->lower_margin < 1 || var->lower_margin > 64 ||
-           var->hsync_len < 32 || var->hsync_len > 120 ||
+           var->hsync_len < 32 || var->hsync_len > 240 ||
            var->vsync_len < 2 || var->vsync_len > 64 ||
            var->pixclock < 6000 || var->pixclock > 40000 ||
            var->xres * var->yres * (ch->cfg.bpp / 8) * 2 > info->fix.smem_len) {
@@ -1349,8 +1349,10 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
                if (priv->ch[i].sglist)
                        vfree(priv->ch[i].sglist);
 
-               dma_free_coherent(&pdev->dev, info->fix.smem_len,
-                                 info->screen_base, priv->ch[i].dma_handle);
+               if (info->screen_base)
+                       dma_free_coherent(&pdev->dev, info->fix.smem_len,
+                                         info->screen_base,
+                                         priv->ch[i].dma_handle);
                fb_dealloc_cmap(&info->cmap);
                framebuffer_release(info);
        }