mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
c02ed2e75e
commit
8ce95844c8
|
@ -1700,12 +1700,12 @@ int of_genpd_add_provider_simple(struct device_node *np,
|
||||||
|
|
||||||
mutex_lock(&gpd_list_lock);
|
mutex_lock(&gpd_list_lock);
|
||||||
|
|
||||||
if (pm_genpd_present(genpd))
|
if (pm_genpd_present(genpd)) {
|
||||||
ret = genpd_add_provider(np, genpd_xlate_simple, genpd);
|
ret = genpd_add_provider(np, genpd_xlate_simple, genpd);
|
||||||
|
if (!ret) {
|
||||||
if (!ret) {
|
genpd->provider = &np->fwnode;
|
||||||
genpd->provider = &np->fwnode;
|
genpd->has_provider = true;
|
||||||
genpd->has_provider = true;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&gpd_list_lock);
|
mutex_unlock(&gpd_list_lock);
|
||||||
|
|
Loading…
Reference in New Issue