]> git.baikalelectronics.ru Git - kernel.git/commit
PM: runtime: Fix ordering in pm_runtime_get_suppliers()
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 26 Mar 2021 10:56:18 +0000 (12:56 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Mar 2021 17:27:09 +0000 (19:27 +0200)
commitff72e9ac7afe324c4d1de19a1f5b6b58a85f9e85
tree3fbaa2ded7c272a6869b18bf2ffd87d638a328db
parenta1f6d97777d7ce5166294726898125ce00264085
PM: runtime: Fix ordering in pm_runtime_get_suppliers()

rpm_active indicates how many times the supplier usage_count has been
incremented. Consequently it must be updated after pm_runtime_get_sync() of
the supplier, not before.

Fixes: ac57dc3c055c ("driver core: Fix possible supplier PM-usage counter imbalance")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: 5.1+ <stable@vger.kernel.org> # 5.1+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/runtime.c