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>
This commit is contained in:
Gustavo Padovan 2014-11-24 16:23:30 -02:00 committed by Inki Dae
parent 1c9ff4ab43
commit 5baf5d44fb

View file

@ -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);