diff options
author | Jon Hunter <jonathanh@nvidia.com> | 2016-10-22 21:23:55 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-11-15 15:51:54 +0100 |
commit | cd5ceda27d4b45b797ede85c844fc08da5aa70e3 (patch) | |
tree | 16096da6251e7b1eb416b103097beeb16a836062 /drivers/soc/tegra | |
parent | soc/tegra: pmc: Clean-up I/O rail error messages (diff) | |
download | linux-cd5ceda27d4b45b797ede85c844fc08da5aa70e3.tar.xz linux-cd5ceda27d4b45b797ede85c844fc08da5aa70e3.zip |
soc/tegra: pmc: Check return code for pm_genpd_init()
Commit 7eb231c337e0 ("PM / Domains: Convert pm_genpd_init() to return
an error code") updated pm_genpd_init() to return an error code. Update
the Tegra PMC driver to check the return value from pm_genpd_init() and
handle any errors returned.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
[treding@nvidia.com: use pr_err() instead of dev_err()]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc/tegra')
-rw-r--r-- | drivers/soc/tegra/pmc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 78fffa22966f..bc4267c7fe15 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -855,7 +855,12 @@ static void tegra_powergate_add(struct tegra_pmc *pmc, struct device_node *np) (id == TEGRA_POWERGATE_XUSBA || id == TEGRA_POWERGATE_XUSBC)) goto power_on_cleanup; - pm_genpd_init(&pg->genpd, NULL, off); + err = pm_genpd_init(&pg->genpd, NULL, off); + if (err < 0) { + pr_err("failed to initialise power domain %s: %d\n", np->name, + err); + goto remove_resets; + } err = of_genpd_add_provider_simple(np, &pg->genpd); if (err < 0) { |