1
0
Fork 0

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>
hifive-unleashed-5.1
Viresh Kumar 2017-03-17 11:19:21 +05:30 committed by Rafael J. Wysocki
parent c02ed2e75e
commit 8ce95844c8
1 changed files with 5 additions and 5 deletions

View File

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