Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7b06a09 authored by Gaurav Jindal's avatar Gaurav Jindal Committed by Rafael J. Wysocki
Browse files

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: default avatarGaurav Jindal <gauravjindal1104@gmail.com>
[ rjw: Subject & changelog ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c523c68d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)