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>
This commit is contained in:
Timur Tabi 2011-09-15 16:44:55 -05:00 committed by Florian Tobias Schandinat
parent ec02dd23dc
commit 589c797193
1 changed files with 1 additions and 0 deletions

View File

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