drivers/video: fsl-diu-fb: fix memory leak on error
authorTimur Tabi <timur@freescale.com>
Thu, 15 Sep 2011 21:44:55 +0000 (16:44 -0500)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sun, 18 Sep 2011 20:08:57 +0000 (20:08 +0000)
We were forgetting to unmap the video memory if fsl_diu_check_var() fails.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/fsl-diu-fb.c

index 3776949d61834fcee1dd27b87470f244ad9a0964..c66f6ed578863a4edcb0b4a266f7b44f2e559361 100644 (file)
@@ -1200,6 +1200,7 @@ static int __devinit install_fb(struct fb_info *info)
 
        if (fsl_diu_check_var(&info->var, info)) {
                dev_err(info->dev, "fsl_diu_check_var failed\n");
+               unmap_video_memory(info);
                fb_dealloc_cmap(&info->cmap);
                return -EINVAL;
        }