diff options
author | Timur Tabi <timur@freescale.com> | 2011-09-15 17:44:55 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-09-18 16:08:57 -0400 |
commit | 589c797193547b12c34f80048440bc1cac242fec (patch) | |
tree | 55d484a48886987c6cb783f469f39b8adc0db4d3 /drivers/video/fsl-diu-fb.c | |
parent | ec02dd23dc423cf019f660a63ac9c9d54840a473 (diff) |
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>
Diffstat (limited to 'drivers/video/fsl-diu-fb.c')
-rw-r--r-- | drivers/video/fsl-diu-fb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 3776949d6183..c66f6ed57886 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -1200,6 +1200,7 @@ static int __devinit install_fb(struct fb_info *info) | |||
1200 | 1200 | ||
1201 | if (fsl_diu_check_var(&info->var, info)) { | 1201 | if (fsl_diu_check_var(&info->var, info)) { |
1202 | dev_err(info->dev, "fsl_diu_check_var failed\n"); | 1202 | dev_err(info->dev, "fsl_diu_check_var failed\n"); |
1203 | unmap_video_memory(info); | ||
1203 | fb_dealloc_cmap(&info->cmap); | 1204 | fb_dealloc_cmap(&info->cmap); |
1204 | return -EINVAL; | 1205 | return -EINVAL; |
1205 | } | 1206 | } |