Browse Source

drivers/video: fsl-diu-fb: fix memory leak on error

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>
Timur Tabi 13 years ago
parent
commit
589c797193
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/video/fsl-diu-fb.c

+ 1 - 0
drivers/video/fsl-diu-fb.c

@@ -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;
 	}