mirror of https://gitee.com/openkylin/linux.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 <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
This commit is contained in:
parent
ec02dd23dc
commit
589c797193
|
@ -1200,6 +1200,7 @@ static int __devinit install_fb(struct fb_info *info)
|
||||||
|
|
||||||
if (fsl_diu_check_var(&info->var, info)) {
|
if (fsl_diu_check_var(&info->var, info)) {
|
||||||
dev_err(info->dev, "fsl_diu_check_var failed\n");
|
dev_err(info->dev, "fsl_diu_check_var failed\n");
|
||||||
|
unmap_video_memory(info);
|
||||||
fb_dealloc_cmap(&info->cmap);
|
fb_dealloc_cmap(&info->cmap);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue