Commit d3c335da authored by Clément Péron's avatar Clément Péron Committed by Rob Herring

drm/panfrost: rename error labels in device_init

Rename goto labels in device_init it will be easier to maintain.
Reviewed-by: default avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Signed-off-by: default avatarClément Péron <peron.clem@gmail.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-8-peron.clem@gmail.com
parent 81f2fbe6
...@@ -216,56 +216,56 @@ int panfrost_device_init(struct panfrost_device *pfdev) ...@@ -216,56 +216,56 @@ int panfrost_device_init(struct panfrost_device *pfdev)
err = panfrost_regulator_init(pfdev); err = panfrost_regulator_init(pfdev);
if (err) if (err)
goto err_out0; goto out_clk;
err = panfrost_reset_init(pfdev); err = panfrost_reset_init(pfdev);
if (err) { if (err) {
dev_err(pfdev->dev, "reset init failed %d\n", err); dev_err(pfdev->dev, "reset init failed %d\n", err);
goto err_out1; goto out_regulator;
} }
err = panfrost_pm_domain_init(pfdev); err = panfrost_pm_domain_init(pfdev);
if (err) if (err)
goto err_out2; goto out_reset;
res = platform_get_resource(pfdev->pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pfdev->pdev, IORESOURCE_MEM, 0);
pfdev->iomem = devm_ioremap_resource(pfdev->dev, res); pfdev->iomem = devm_ioremap_resource(pfdev->dev, res);
if (IS_ERR(pfdev->iomem)) { if (IS_ERR(pfdev->iomem)) {
dev_err(pfdev->dev, "failed to ioremap iomem\n"); dev_err(pfdev->dev, "failed to ioremap iomem\n");
err = PTR_ERR(pfdev->iomem); err = PTR_ERR(pfdev->iomem);
goto err_out3; goto out_pm_domain;
} }
err = panfrost_gpu_init(pfdev); err = panfrost_gpu_init(pfdev);
if (err) if (err)
goto err_out3; goto out_pm_domain;
err = panfrost_mmu_init(pfdev); err = panfrost_mmu_init(pfdev);
if (err) if (err)
goto err_out4; goto out_gpu;
err = panfrost_job_init(pfdev); err = panfrost_job_init(pfdev);
if (err) if (err)
goto err_out5; goto out_mmu;
err = panfrost_perfcnt_init(pfdev); err = panfrost_perfcnt_init(pfdev);
if (err) if (err)
goto err_out6; goto out_job;
return 0; return 0;
err_out6: out_job:
panfrost_job_fini(pfdev); panfrost_job_fini(pfdev);
err_out5: out_mmu:
panfrost_mmu_fini(pfdev); panfrost_mmu_fini(pfdev);
err_out4: out_gpu:
panfrost_gpu_fini(pfdev); panfrost_gpu_fini(pfdev);
err_out3: out_pm_domain:
panfrost_pm_domain_fini(pfdev); panfrost_pm_domain_fini(pfdev);
err_out2: out_reset:
panfrost_reset_fini(pfdev); panfrost_reset_fini(pfdev);
err_out1: out_regulator:
panfrost_regulator_fini(pfdev); panfrost_regulator_fini(pfdev);
err_out0: out_clk:
panfrost_clk_fini(pfdev); panfrost_clk_fini(pfdev);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment