Merge "cpuidle: lpm-levels: Check for valid pointer during hotplug notifications"

This commit is contained in:
qctecmdr 2020-10-13 03:43:21 -07:00 • committed by Gerrit - the friendly Code Review server
commit f769cce450

View file

@ -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;