mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "cpuidle: lpm-levels: Check for valid pointer during hotplug notifications"
This commit is contained in:
commit
f769cce450
1 changed files with 6 additions and 0 deletions
|
|
@ -161,6 +161,9 @@ static int lpm_offline_cpu(unsigned int cpu)
|
|||
{
|
||||
struct device *dev = get_cpu_device(cpu);
|
||||
|
||||
if (!dev)
|
||||
return 0;
|
||||
|
||||
dev_pm_qos_remove_notifier(dev, &dev_pm_qos_nb[cpu],
|
||||
DEV_PM_QOS_RESUME_LATENCY);
|
||||
return 0;
|
||||
|
|
@ -170,6 +173,9 @@ static int lpm_online_cpu(unsigned int cpu)
|
|||
{
|
||||
struct device *dev = get_cpu_device(cpu);
|
||||
|
||||
if (!dev)
|
||||
return 0;
|
||||
|
||||
dev_pm_qos_add_notifier(dev, &dev_pm_qos_nb[cpu],
|
||||
DEV_PM_QOS_RESUME_LATENCY);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue