From: Timur Tabi Date: Thu, 15 Sep 2011 21:44:55 +0000 (-0500) Subject: drivers/video: fsl-diu-fb: fix memory leak on error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=589c797193547b12c34f80048440bc1cac242fec;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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; }