Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ce95844 authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki
Browse files

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c02ed2e7
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1700,13 +1700,13 @@ 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;
		}
	}

	mutex_unlock(&gpd_list_lock);