projects/linux·commit 7ee5fd12

Merge branch 'pm-opp'

7ee5fd12 · Rafael J. Wysocki <[email protected]> · 2021-08-27 20:27:01 +02:00

* pm-opp:
  opp: core: Check for pending links before reading required_opp pointers
Commit
7ee5fd12e8cac91bdec6de8417b030ed05d5d7ee
Parents
3c5a2722 · 1f8b66d9

Merge commit. Changes below are compared with the first parent: 3c5a2722.

Changes

1 files changed · +4 −4

FileStatusAddDelContent
drivers/opp/core.cmodified+4−4View file

drivers/opp/core.c

View file
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 5543c54..04b4691 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -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
@@ -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);