Skip to content

Commit

Permalink
drm/exynos: avoid leak if exynos_dpi_probe() fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gustavo Padovan authored and Inki Dae committed Nov 25, 2014
1 parent 1c9ff4a commit 5baf5d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/exynos/exynos_drm_fimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5baf5d4

Please sign in to comment.