Skip to content

Commit

Permalink
drivers/video: fsl-diu-fb: fix memory leak on error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Timur Tabi authored and Florian Tobias Schandinat committed Sep 18, 2011
1 parent ec02dd2 commit 589c797
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/fsl-diu-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 589c797

Please sign in to comment.