diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2017-03-17 11:19:21 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-29 00:09:21 +0200 |
commit | 8ce95844c85349243520b6943ec1225a047d7d6c (patch) | |
tree | 0e6f66b1d5836be3b401eee55e2f457fc1d2708a | |
parent | c02ed2e75ef4c74e41e421acb4ef1494671585e8 (diff) | |
download | linux-8ce95844c85349243520b6943ec1225a047d7d6c.tar.gz linux-8ce95844c85349243520b6943ec1225a047d7d6c.tar.xz |
PM / Domain: remove conditional from error case
There is no point running the conditional 'if' statement if the genpd
isn't present.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/base/power/domain.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index e697dec9d25b..1a0549f1944a 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1700,12 +1700,12 @@ int of_genpd_add_provider_simple(struct device_node *np, mutex_lock(&gpd_list_lock); - if (pm_genpd_present(genpd)) + if (pm_genpd_present(genpd)) { ret = genpd_add_provider(np, genpd_xlate_simple, genpd); - - if (!ret) { - genpd->provider = &np->fwnode; - genpd->has_provider = true; + if (!ret) { + genpd->provider = &np->fwnode; + genpd->has_provider = true; + } } mutex_unlock(&gpd_list_lock); |