drm/imx: parallel-display: fix imxpd-->edid memleak
authorPeter Seiderer <ps.report@gmx.net>
Sun, 8 Dec 2013 21:03:58 +0000 (22:03 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 6 Jan 2015 16:36:13 +0000 (17:36 +0100)
If edid was allocated during bind, it must be freed again during unbind.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/parallel-display.c

index 796c3c1c170a1136a22908825e49570e71d2cad5..88cf7ca1e886a52b156da75264ff702dea7baef6 100644 (file)
@@ -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;
 }