mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
cpuidle: Clean up cpuidle_enable_device() error handling a bit
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>
This commit is contained in:
parent
c523c68da2
commit
e7b06a09e7
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue