Skip to content

Commit

Permalink
Merge branch 'pm-opp'
Browse files Browse the repository at this point in the history
* pm-opp:
  opp: core: Check for pending links before reading required_opp pointers
  • Loading branch information
rafaeljw committed Aug 27, 2021
2 parents 3c5a272 + 1f8b66d commit 7ee5fd1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/opp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,10 @@ static int _set_required_opps(struct device *dev,
if (!required_opp_tables)
return 0;

/* required-opps not fully initialized yet */
if (lazy_linking_pending(opp_table))
return -EBUSY;

/*
* We only support genpd's OPPs in the "required-opps" for now, as we
* don't know much about other use cases. Error out if the required OPP
Expand All @@ -903,10 +907,6 @@ static int _set_required_opps(struct device *dev,
return -ENOENT;
}

/* required-opps not fully initialized yet */
if (lazy_linking_pending(opp_table))
return -EBUSY;

/* Single genpd case */
if (!genpd_virt_devs)
return _set_required_opp(dev, dev, opp, 0);
Expand Down

0 comments on commit 7ee5fd1

Please sign in to comment.