Skip to content

Commit 7ee5fd1

Browse files
committed
Merge branch 'pm-opp'
* pm-opp: opp: core: Check for pending links before reading required_opp pointers
2 parents 3c5a272 + 1f8b66d commit 7ee5fd1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/opp/core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,10 @@ static int _set_required_opps(struct device *dev,
893893
if (!required_opp_tables)
894894
return 0;
895895

896+
/* required-opps not fully initialized yet */
897+
if (lazy_linking_pending(opp_table))
898+
return -EBUSY;
899+
896900
/*
897901
* We only support genpd's OPPs in the "required-opps" for now, as we
898902
* don't know much about other use cases. Error out if the required OPP
@@ -903,10 +907,6 @@ static int _set_required_opps(struct device *dev,
903907
return -ENOENT;
904908
}
905909

906-
/* required-opps not fully initialized yet */
907-
if (lazy_linking_pending(opp_table))
908-
return -EBUSY;
909-
910910
/* Single genpd case */
911911
if (!genpd_virt_devs)
912912
return _set_required_opp(dev, dev, opp, 0);

0 commit comments

Comments
 (0)