Skip to content

Commit

Permalink
PM / Domains: Fix pm_genpd_poweron()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Aug 5, 2011
1 parent de96355 commit fe202fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fe202fd

Please sign in to comment.