projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c523c68
)
cpuidle: Clean up cpuidle_enable_device() error handling a bit
author
Gaurav Jindal
<gauravjindal1104@gmail.com>
Fri, 1 Sep 2017 15:07:26 +0000
(20:37 +0530)
committer
Rafael J. Wysocki
<rafael.j.wysocki@intel.com>
Wed, 8 Nov 2017 22:09:52 +0000
(23:09 +0100)
Do not fetch per CPU drv if cpuidle_curr_governor is NULL
to avoid useless per CPU processing.
Signed-off-by: Gaurav Jindal <gauravjindal1104@gmail.com>
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle.c
patch
|
blob
|
history
diff --git
a/drivers/cpuidle/cpuidle.c
b/drivers/cpuidle/cpuidle.c
index
ed4df58
..
27f9648
100644
(file)
--- a/
drivers/cpuidle/cpuidle.c
+++ b/
drivers/cpuidle/cpuidle.c
@@
-388,9
+388,12
@@
int cpuidle_enable_device(struct cpuidle_device *dev)
if (dev->enabled)
return 0;
+ if (!cpuidle_curr_governor)
+ return -EIO;
+
drv = cpuidle_get_cpu_driver(dev);
- if (!drv
|| !cpuidle_curr_governor
)
+ if (!drv)
return -EIO;
if (!dev->registered)