Message ID | 20220628021244.17281-1-peter.wang@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] PM-runtime: Check supplier_preactivated before release supplier | expand |
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 676dc72d912d..08bbc4561e60 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -337,8 +337,10 @@ static void __rpm_put_suppliers(struct device *dev, bool try_to_suspend) struct device_link *link; list_for_each_entry_rcu(link, &dev->links.suppliers, c_node, - device_links_read_lock_held()) - pm_runtime_release_supplier(link, try_to_suspend); + device_links_read_lock_held()) { + if (!link->supplier_preactivated) + pm_runtime_release_supplier(link, try_to_suspend); + } } static void rpm_put_suppliers(struct device *dev)