projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cpuidle: call cpuidle_get_driver() from after taking cpuidle_driver_lock
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
cpuidle
/
driver.c
diff --git
a/drivers/cpuidle/driver.c
b/drivers/cpuidle/driver.c
index a930005d5a3af15c49666a97272b139ce41a24f1..2458a741ad4566eebfa19bb22ceb667c4e7419c9 100644
(file)
--- a/
drivers/cpuidle/driver.c
+++ b/
drivers/cpuidle/driver.c
@@
-338,10
+338,11
@@
struct cpuidle_driver *cpuidle_driver_ref(void)
*/
void cpuidle_driver_unref(void)
{
- struct cpuidle_driver *drv
= cpuidle_get_driver()
;
+ struct cpuidle_driver *drv;
spin_lock(&cpuidle_driver_lock);
+ drv = cpuidle_get_driver();
if (drv && !WARN_ON(drv->refcnt <= 0))
drv->refcnt--;