Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH 10/13] drivers/video: fsl-diu-fb: fix memory leak on error
@ 2011-09-15 21:44 Timur Tabi
  0 siblings, 0 replies; only message in thread
From: Timur Tabi @ 2011-09-15 21:44 UTC (permalink / raw)
  To: linux-fbdev

We were forgetting to unmap the video memory if fsl_diu_check_var() fails.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 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 3776949..c66f6ed 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)
 
 	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;
 	}
-- 
1.7.3.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-15 21:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-15 21:44 [PATCH 10/13] drivers/video: fsl-diu-fb: fix memory leak on error Timur Tabi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox