Skip to contentSkip to conversation

drm/exynos: avoid leak if exynos_dpi_probe() fails

PATCH New Gustavo Padovan 1 participant 1 message Nov 24, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/exynos: avoid leak if exynos_dpi_probe() fails

From: Gustavo Padovan <[email protected]>

The component must be deleted if the probe fails.

---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimd.c +4 -2
index 1bf52ab..abd2ca9 100644
@@ -1215,8 +1215,10 @@ static int fimd_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, ctx);
 
 	ctx->display = exynos_dpi_probe(dev);
-	if (IS_ERR(ctx->display))
-		return PTR_ERR(ctx->display);
+	if (IS_ERR(ctx->display)) {
+		ret = PTR_ERR(ctx->display);
+		goto err_del_component;
+	}
 
 	pm_runtime_enable(dev);
 
Signature · 6 lines
1.9.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel