linux/drivers/cpufreq
Viresh Kumar 2d730b465e cpufreq: exit() callback is optional
[ Upstream commit b8f85833c0 ]

The exit() callback is optional and shouldn't be called without checking
a valid pointer first.

Also, we must clear freq_table pointer even if the exit() callback isn't
present.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Fixes: 91a12e91dc ("cpufreq: Allow light-weight tear down and bring up of CPUs")
Fixes: f339f35417 ("cpufreq: Rearrange locking in cpufreq_remove_dev()")
Reported-by: Lizhe <sensor1010@163.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:28:34 +02:00
..
acpi-cpufreq.c x86/devicetable: Move x86 specific macro out of generic code 2022-10-07 09:16:54 +02:00
amd_freq_sensitivity.c cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() 2023-01-18 11:40:55 +01:00
arm_big_little.c cpufreq: arm_big_little: Register an Energy Model 2019-02-07 09:55:11 +05:30
arm_big_little.h cpufreq: arm_big_little: make function arguments and structure pointer const 2017-11-08 23:22:19 +01:00
armada-8k-cpufreq.c cpufreq: ap806: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
armada-37xx-cpufreq.c cpufreq: armada-37xx: stop using 0 as NULL pointer 2023-02-06 07:52:41 +01:00
bmips-cpufreq.c cpufreq: Make cpufreq_generic_init() return void 2019-07-16 10:20:11 +02:00
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug 2023-09-23 10:59:56 +02:00
cppc_cpufreq.c cpufreq: Avoid creating excessively large stack frames 2020-02-11 04:35:25 -08:00
cpufreq_conservative.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq_governor_attr_set.c cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory 2021-10-06 15:42:30 +02:00
cpufreq_governor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq_governor.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq_ondemand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq_ondemand.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq_performance.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq_powersave.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq_stats.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq_userspace.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq-dt-platdev.c cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist 2023-02-06 07:52:41 +01:00
cpufreq-dt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq-dt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpufreq-nforce2.c cpufreq: Avoid creating excessively large stack frames 2020-02-11 04:35:25 -08:00
cpufreq.c cpufreq: exit() callback is optional 2024-06-16 13:28:34 +02:00
davinci-cpufreq.c Merge branch 'pm-cpufreq' 2019-07-18 09:49:30 +02:00
e_powersaver.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
elanfreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
freq_table.c cpufreq: Avoid creating excessively large stack frames 2020-02-11 04:35:25 -08:00
gx-suspmod.c cpufreq: Avoid creating excessively large stack frames 2020-02-11 04:35:25 -08:00
highbank-cpufreq.c cpufreq: highbank: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
ia64-acpi-cpufreq.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
imx6q-cpufreq.c cpufreq: imx6q: Don't disable 792 Mhz OPP unnecessarily 2023-12-08 08:44:28 +01:00
imx-cpufreq-dt.c cpufreq: imx-cpufreq-dt: Correct i.MX8MN's default speed grade value 2019-12-13 08:43:28 +01:00
intel_pstate.c cpufreq: intel_pstate: Drop ACPI _PSS states table patching 2023-08-11 11:53:53 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.arm cpufreq: ap806: fix cpufreq driver needs ap cpu clk 2020-08-19 08:16:18 +02:00
Kconfig.powerpc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.x86 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
kirkwood-cpufreq.c cpufreq: Make cpufreq_generic_init() return void 2019-07-16 10:20:11 +02:00
longhaul.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
longhaul.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
longrun.c cpufreq: Avoid creating excessively large stack frames 2020-02-11 04:35:25 -08:00
loongson1-cpufreq.c cpufreq: loongson1: Add missing MODULE_ALIAS 2020-12-30 11:51:20 +01:00
loongson2_cpufreq.c cpufreq: Make cpufreq_generic_init() return void 2019-07-16 10:20:11 +02:00
Makefile Merge branch 'cpufreq/qcom-updates' into cpufreq/arm/linux-next 2019-09-03 07:55:22 +05:30
maple-cpufreq.c Merge branch 'pm-cpufreq' 2019-07-18 09:49:30 +02:00
mediatek-cpufreq.c cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
mvebu-cpufreq.c cpufreq: mvebu: Remove OPPs using dev_pm_opp_remove() 2018-09-19 14:56:44 -07:00
omap-cpufreq.c Merge branch 'pm-cpufreq' 2019-07-18 09:49:30 +02:00
p4-clockmod.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pasemi-cpufreq.c cpufreq/pasemi: fix use-after-free in pas_cpufreq_cpu_init() 2019-07-23 09:49:10 +02:00
pcc-cpufreq.c cpufreq: Avoid creating excessively large stack frames 2020-02-11 04:35:25 -08:00
pmac32-cpufreq.c cpufreq: pmac32-cpufreq: Fix refcount leak bug 2022-07-21 20:59:24 +02:00
pmac64-cpufreq.c Merge branch 'pm-cpufreq' 2019-07-18 09:49:30 +02:00
powernow-k6.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
powernow-k7.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
powernow-k7.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
powernow-k8.c cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit() 2023-09-23 10:59:41 +02:00
powernow-k8.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 347 2019-06-05 17:37:08 +02:00
powernv-cpufreq.c cpufreq: powernv: Fix init_chip_info initialization in numa=off 2021-09-22 12:26:37 +02:00
ppc_cbe_cpufreq_pervasive.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
ppc_cbe_cpufreq_pmi.c cpufreq: Use per-policy frequency QoS 2019-10-21 02:05:21 +02:00
ppc_cbe_cpufreq.c cpufreq: powerpc_cbe: Switch to QoS requests for freq limits 2019-08-26 10:02:01 +02:00
ppc_cbe_cpufreq.h cpufreq: powerpc_cbe: Switch to QoS requests for freq limits 2019-08-26 10:02:01 +02:00
pxa2xx-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pxa3xx-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
qcom-cpufreq-hw.c cpufreq: qcom-hw: invoke frequency-invariance setter function 2019-08-22 11:31:04 +05:30
qcom-cpufreq-nvmem.c cpufreq: qcom: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
qoriq-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
raspberrypi-cpufreq.c cpufreq: add driver for Raspberry Pi 2019-06-13 08:58:22 +05:30
s3c24xx-cpufreq-debugfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
s3c24xx-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
s3c64xx-cpufreq.c Merge branch 'pm-cpufreq' 2019-07-18 09:49:30 +02:00
s3c2410-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
s3c2412-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
s3c2416-cpufreq.c Merge branch 'pm-cpufreq' 2019-07-18 09:49:30 +02:00
s3c2440-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
s5pv210-cpufreq.c Merge branch 'pm-cpufreq' 2019-07-18 09:49:30 +02:00
sa1100-cpufreq.c cpufreq: Make cpufreq_generic_init() return void 2019-07-16 10:20:11 +02:00
sa1110-cpufreq.c Merge branch 'pm-cpufreq' 2019-07-18 09:49:30 +02:00
sc520_freq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
scmi-cpufreq.c Merge branch 'pm-opp' 2019-03-04 11:19:14 +01:00
scpi-cpufreq.c cpufreq: scpi: Add missing MODULE_ALIAS 2020-12-30 11:51:20 +01:00
sfi-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
sh-cpufreq.c cpufreq: Avoid creating excessively large stack frames 2020-02-11 04:35:25 -08:00
sparc-us2e-cpufreq.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
sparc-us3-cpufreq.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
spear-cpufreq.c cpufreq: Make cpufreq_generic_init() return void 2019-07-16 10:20:11 +02:00
speedstep-centrino.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
speedstep-ich.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
speedstep-lib.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
speedstep-lib.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
speedstep-smi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
sti-cpufreq.c cpufreq: st: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
sun50i-cpufreq-nvmem.c cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe 2022-05-09 09:03:25 +02:00
tango-cpufreq.c cpufreq: dt: Don't use generic platdev driver for tango 2017-07-22 02:20:59 +02:00
tegra20-cpufreq.c cpufreq: Make cpufreq_generic_init() return void 2019-07-16 10:20:11 +02:00
tegra124-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
tegra186-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
ti-cpufreq.c cpufreq: ti-cpufreq: Mark expected switch fall-through 2019-07-30 08:10:45 +05:30
unicore2-cpufreq.c cpufreq: Avoid creating excessively large stack frames 2020-02-11 04:35:25 -08:00
vexpress-spc-cpufreq.c cpufreq: arm_big_little: make cpufreq_arm_bL_ops structures const 2017-11-08 23:22:20 +01:00