aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-08-05 15:45:11 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-08-05 15:45:11 -0400
commitfe202fde50a986a8510c62a76dc8733c1a8fac86 (patch)
tree055cb487668446bcf184650039ac8a12268a6b81
parentde96355c111679dd6e2c5c73e25e814c72510c58 (diff)
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 <rjw@sisk.pl>
-rw-r--r--drivers/base/power/domain.c3
1 files changed, 1 insertions, 2 deletions
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)
80int pm_genpd_poweron(struct generic_pm_domain *genpd) 80int pm_genpd_poweron(struct generic_pm_domain *genpd)
81{ 81{
82 struct generic_pm_domain *parent = genpd->parent; 82 struct generic_pm_domain *parent = genpd->parent;
83 DEFINE_WAIT(wait);
84 int ret = 0; 83 int ret = 0;
85 84
86 start: 85 start:
@@ -112,7 +111,7 @@ int pm_genpd_poweron(struct generic_pm_domain *genpd)
112 } 111 }
113 112
114 if (genpd->power_on) { 113 if (genpd->power_on) {
115 int ret = genpd->power_on(genpd); 114 ret = genpd->power_on(genpd);
116 if (ret) 115 if (ret)
117 goto out; 116 goto out;
118 } 117 }