From: Gustavo Padovan Date: Mon, 24 Nov 2014 18:23:30 +0000 (-0200) Subject: drm/exynos: avoid leak if exynos_dpi_probe() fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5baf5d44fbcde002d7f3f8148e69305f520770dd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/exynos: avoid leak if exynos_dpi_probe() fails The component must be deleted if the probe fails. Signed-off-by: Gustavo Padovan Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index ef80a3537f35..e5810d13bf9c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -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);