diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2014-11-24 16:23:30 -0200 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2014-11-25 11:58:43 +0900 |
commit | 5baf5d44fbcde002d7f3f8148e69305f520770dd (patch) | |
tree | 502f88e0d48b86d0db751e846a02a9304206f8ca /drivers/gpu/drm/exynos | |
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>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-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 ef80a3537f3..e5810d13bf9 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); |