summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2018-02-23 17:18:18 +0200
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit58010ecad81ca61fb558afed79eec2fddd28bd1a (patch)
tree5565166dc42848f88be0bba038fec4b1094a0f02 /drivers/video
parent3af8d8d122e9636e42c0e15c7e2525be4537a102 (diff)
video: mxsfb: Fix leaking videomem if dispdrv not ready
This is a large leak and repeated probing can even exhaust CMA Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/mxsfb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c
index 0ec3c03763f9..15ab40234ab6 100644
--- a/drivers/video/fbdev/mxsfb.c
+++ b/drivers/video/fbdev/mxsfb.c
@@ -2296,7 +2296,7 @@ static int mxsfb_probe(struct platform_device *pdev)
if (ret == -EPROBE_DEFER)
dev_info(&pdev->dev,
"Defer fb probe due to dispdrv not ready\n");
- goto fb_pm_runtime_disable;
+ goto fb_free_videomem;
}
if (!host->dispdrv) {
@@ -2342,6 +2342,8 @@ fb_unregister:
#endif
fb_destroy:
fb_destroy_modelist(&fb_info->modelist);
+fb_free_videomem:
+ mxsfb_free_videomem(host);
fb_pm_runtime_disable:
clk_disable_pix(host);
clk_disable_axi(host);