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

Commit 716220c9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: Set policy for NULL before cleaning up kobj"

parents 2f3a5325 0c3bb4bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1252,6 +1252,7 @@ static int __cpufreq_remove_dev_finish(struct device *dev,

	read_lock_irqsave(&cpufreq_driver_lock, flags);
	policy = per_cpu(cpufreq_cpu_data, cpu);
	per_cpu(cpufreq_cpu_data, cpu) = NULL;
	read_unlock_irqrestore(&cpufreq_driver_lock, flags);

	if (!policy) {
@@ -1321,7 +1322,6 @@ static int __cpufreq_remove_dev_finish(struct device *dev,
		}
	}

	per_cpu(cpufreq_cpu_data, cpu) = NULL;
	return 0;
}