From: Peter Seiderer Date: Sun, 8 Dec 2013 21:03:58 +0000 (+0100) Subject: drm/imx: parallel-display: fix imxpd-->edid memleak X-Git-Tag: v4.0-rc1~74^2~39^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dcbc9eb1919359719be0ef652afe1d90b0fa98ed;p=platform%2Fkernel%2Flinux-exynos.git drm/imx: parallel-display: fix imxpd-->edid memleak If edid was allocated during bind, it must be freed again during unbind. Signed-off-by: Peter Seiderer Acked-by: Sascha Hauer Signed-off-by: Philipp Zabel --- diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c index 796c3c1..88cf7ca 100644 --- a/drivers/gpu/drm/imx/parallel-display.c +++ b/drivers/gpu/drm/imx/parallel-display.c @@ -257,6 +257,8 @@ static void imx_pd_unbind(struct device *dev, struct device *master, imxpd->encoder.funcs->destroy(&imxpd->encoder); imxpd->connector.funcs->destroy(&imxpd->connector); + + kfree(imxpd->edid); } static const struct component_ops imx_pd_ops = { @@ -272,6 +274,7 @@ static int imx_pd_probe(struct platform_device *pdev) static int imx_pd_remove(struct platform_device *pdev) { component_del(&pdev->dev, &imx_pd_ops); + return 0; }