diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2014-11-24 13:23:30 -0500 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2014-11-24 21:58:43 -0500 |
commit | 5baf5d44fbcde002d7f3f8148e69305f520770dd (patch) | |
tree | 502f88e0d48b86d0db751e846a02a9304206f8ca | |
parent | 1c9ff4ab43a83f2b412f81ad4db862e5533c745d (diff) |
drm/exynos: avoid leak if exynos_dpi_probe() fails
The component must be deleted if the probe fails.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) | |||
1215 | platform_set_drvdata(pdev, ctx); | 1215 | platform_set_drvdata(pdev, ctx); |
1216 | 1216 | ||
1217 | ctx->display = exynos_dpi_probe(dev); | 1217 | ctx->display = exynos_dpi_probe(dev); |
1218 | if (IS_ERR(ctx->display)) | 1218 | if (IS_ERR(ctx->display)) { |
1219 | return PTR_ERR(ctx->display); | 1219 | ret = PTR_ERR(ctx->display); |
1220 | goto err_del_component; | ||
1221 | } | ||
1220 | 1222 | ||
1221 | pm_runtime_enable(dev); | 1223 | pm_runtime_enable(dev); |
1222 | 1224 | ||