Merge tag 'pm-6.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
"Prevent cpufreq_update_limits() from crashing the kernel due to a NULL
pointer dereference when it is called before registering a cpufreq
driver, for instance as a result of a notification triggered by the
platform firmware (Rafael Wysocki)"

* tag 'pm-6.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: Reference count policy in cpufreq_update_limits()

+6
+6
drivers/cpufreq/cpufreq.c
··· 2809 */ 2810 void cpufreq_update_limits(unsigned int cpu) 2811 { 2812 if (cpufreq_driver->update_limits) 2813 cpufreq_driver->update_limits(cpu); 2814 else
··· 2809 */ 2810 void cpufreq_update_limits(unsigned int cpu) 2811 { 2812 + struct cpufreq_policy *policy __free(put_cpufreq_policy); 2813 + 2814 + policy = cpufreq_cpu_get(cpu); 2815 + if (!policy) 2816 + return; 2817 + 2818 if (cpufreq_driver->update_limits) 2819 cpufreq_driver->update_limits(cpu); 2820 else