mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 23:51:46 +00:00
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)) {
|
||||
dev_err(info->dev, "fsl_diu_check_var failed\n");
|
||||
unmap_video_memory(info);
|
||||
fb_dealloc_cmap(&info->cmap);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user