From 589c797193547b12c34f80048440bc1cac242fec Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Thu, 15 Sep 2011 16:44:55 -0500 Subject: 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 Signed-off-by: Florian Tobias Schandinat --- drivers/video/fsl-diu-fb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/video') 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) 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; } -- cgit v1.2.3