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

Commit f769cce4 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents c53f4ac1 61d682eb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;