From: Rafael J. Wysocki Date: Fri, 5 Aug 2011 19:45:11 +0000 (+0200) Subject: PM / Domains: Fix pm_genpd_poweron() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fe202fde50a986a8510c62a76dc8733c1a8fac86;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git PM / Domains: Fix pm_genpd_poweron() The local variable ret is defined twice in pm_genpd_poweron(), which causes this function to always return 0, even if the PM domain's .power_on() callback fails, in which case an error code should be returned. Remove the wrong second definition of ret and additionally remove an unnecessary definition of wait from pm_genpd_poweron(). Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index be8714aa9dd6..e18566a0fedd 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -80,7 +80,6 @@ static void genpd_set_active(struct generic_pm_domain *genpd) int pm_genpd_poweron(struct generic_pm_domain *genpd) { struct generic_pm_domain *parent = genpd->parent; - DEFINE_WAIT(wait); int ret = 0; start: @@ -112,7 +111,7 @@ int pm_genpd_poweron(struct generic_pm_domain *genpd) } if (genpd->power_on) { - int ret = genpd->power_on(genpd); + ret = genpd->power_on(genpd); if (ret) goto out; }