linux-stable/drivers/cpufreq
Viresh Kumar dfc56ff5ec 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:32:05 +02:00
..
acpi-cpufreq.c cpufreq: ACPI: Set cpuinfo.max_freq directly if max boost is known 2021-03-04 11:38:22 +01:00
amd_freq_sensitivity.c cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() 2023-01-14 10:15:18 +01:00
armada-8k-cpufreq.c cpufreq: ap806: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:53:37 +01:00
armada-37xx-cpufreq.c cpufreq: armada-37xx: stop using 0 as NULL pointer 2023-02-01 08:23:17 +01:00
bmips-cpufreq.c
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs-cpufreq: fix up "add check for cpufreq_cpu_get's return value" 2024-04-13 12:58:47 +02:00
cppc_cpufreq.c cpufreq: CPPC: Reuse caps variable in few routines 2020-07-30 10:57:47 +05:30
cpufreq-dt-platdev.c cpufreq: Use of_property_present() for testing DT property presence 2024-01-25 14:37:40 -08:00
cpufreq-dt.c cpufreq: dt: always allocate zeroed cpumask 2024-04-13 12:58:40 +02:00
cpufreq-dt.h cpufreq: dt: Allow platform specific intermediate callbacks 2020-03-12 15:43:52 +05:30
cpufreq-nforce2.c cpufreq: Avoid creating excessively large stack frames 2020-01-27 10:33:33 +01:00
cpufreq.c cpufreq: exit() callback is optional 2024-06-16 13:32:05 +02:00
cpufreq_conservative.c cpufreq: Register governors at core_initcall 2020-07-02 13:03:30 +02:00
cpufreq_governor.c cpufreq: cpufreq_governor: Demote store_sampling_rate() header to standard comment block 2020-07-15 15:17:06 +02:00
cpufreq_governor.h cpufreq: Introduce governor flags 2020-11-10 18:31:17 +01:00
cpufreq_governor_attr_set.c cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory 2021-10-06 15:55:46 +02:00
cpufreq_ondemand.c cpufreq: Register governors at core_initcall 2020-07-02 13:03:30 +02:00
cpufreq_ondemand.h
cpufreq_performance.c cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET 2020-11-10 18:31:17 +01:00
cpufreq_powersave.c cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET 2020-11-10 18:31:17 +01:00
cpufreq_stats.c cpufreq: stats: Fix buffer overflow detection in trans_stats() 2023-11-28 16:54:59 +00:00
cpufreq_userspace.c cpufreq: Register governors at core_initcall 2020-07-02 13:03:30 +02:00
davinci-cpufreq.c cpufreq: Replace HTTP links with HTTPS ones 2020-07-13 17:54:37 +02:00
e_powersaver.c cpufreq: e_powersaver: remove unreachable break 2020-10-27 18:42:54 +01:00
elanfreq.c cpufreq: Convert to new X86 CPU match macros 2020-03-24 21:31:27 +01:00
freq_table.c cpufreq: ACPI: Set cpuinfo.max_freq directly if max boost is known 2021-03-04 11:38:22 +01:00
gx-suspmod.c cpufreq: Avoid creating excessively large stack frames 2020-01-27 10:33:33 +01:00
highbank-cpufreq.c cpufreq: highbank: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:53:38 +01:00
ia64-acpi-cpufreq.c
imx-cpufreq-dt.c cpufreq: Use of_property_present() for testing DT property presence 2024-01-25 14:37:40 -08:00
imx6q-cpufreq.c cpufreq: Use of_property_present() for testing DT property presence 2024-01-25 14:37:40 -08:00
intel_pstate.c cpufreq: intel_pstate: Drop ACPI _PSS states table patching 2023-08-11 11:57:44 +02:00
Kconfig cpufreq: Avoid configuring old governors as default with intel_pstate 2020-10-27 18:45:34 +01:00
Kconfig.arm cpufreq: imx: fix NVMEM_IMX_OCOTP dependency 2020-12-30 11:53:39 +01:00
Kconfig.powerpc
Kconfig.x86 treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
kirkwood-cpufreq.c cpufreq: kirkwood: convert to devm_platform_ioremap_resource 2020-01-07 13:29:58 +05:30
longhaul.c cpufreq: e_powersaver: remove unreachable break 2020-10-27 18:42:54 +01:00
longhaul.h
longrun.c cpufreq: Convert to new X86 CPU match macros 2020-03-24 21:31:27 +01:00
loongson1-cpufreq.c cpufreq: loongson1: Add missing MODULE_ALIAS 2020-12-30 11:53:38 +01:00
loongson2_cpufreq.c mips: loongsoon2ef: remove private clk api 2020-04-16 17:34:23 +02:00
Makefile Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-08-04 12:44:53 +02:00
maple-cpufreq.c
mediatek-cpufreq.c cpufreq: mediatek: Unregister platform device on exit 2022-06-09 10:21:19 +02:00
mvebu-cpufreq.c
omap-cpufreq.c OPP: refactor dev_pm_opp_of_register_em() and update related drivers 2020-06-24 17:16:42 +02:00
p4-clockmod.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pasemi-cpufreq.c cpufreq: pasemi: Include header file for {check,restore}_astate prototypes 2020-07-15 15:17:06 +02:00
pcc-cpufreq.c cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused 2020-07-15 15:17:06 +02:00
pmac32-cpufreq.c cpufreq: pmac32-cpufreq: Fix refcount leak bug 2022-07-21 21:20:14 +02:00
pmac64-cpufreq.c
powernow-k6.c cpufreq: Convert to new X86 CPU match macros 2020-03-24 21:31:27 +01:00
powernow-k7.c cpufreq: Convert to new X86 CPU match macros 2020-03-24 21:31:27 +01:00
powernow-k7.h
powernow-k8.c cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit() 2023-09-19 12:20:07 +02:00
powernow-k8.h
powernv-cpufreq.c cpufreq: powernv: Fix init_chip_info initialization in numa=off 2021-09-18 13:40:36 +02:00
ppc_cbe_cpufreq.c
ppc_cbe_cpufreq.h
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c
pxa2xx-cpufreq.c
pxa3xx-cpufreq.c
qcom-cpufreq-hw.c cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut() 2023-01-14 10:15:16 +01:00
qcom-cpufreq-nvmem.c cpufreq: qcom: fix memory leak in error path 2022-10-30 09:41:15 +01:00
qoriq-cpufreq.c drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c 2022-07-07 17:52:20 +02:00
raspberrypi-cpufreq.c
s3c24xx-cpufreq-debugfs.c ARM: s3c: remove cpufreq header dependencies 2020-08-20 17:52:05 +02:00
s3c24xx-cpufreq.c cpufreq: s3c24xx: move low-level clk reg access into platform code 2020-08-20 17:53:22 +02:00
s3c64xx-cpufreq.c
s3c2410-cpufreq.c cpufreq: s3c24xx: move low-level clk reg access into platform code 2020-08-20 17:53:22 +02:00
s3c2412-cpufreq.c cpufreq: s3c24xx: move low-level clk reg access into platform code 2020-08-20 17:53:22 +02:00
s3c2416-cpufreq.c cpufreq: s3c: fix unbalances of cpufreq policy refcount 2020-01-07 13:31:01 +05:30
s3c2440-cpufreq.c cpufreq: s3c24xx: move low-level clk reg access into platform code 2020-08-20 17:53:22 +02:00
s5pv210-cpufreq.c cpufreq: s5pv210: Use dev_err instead of pr_err in probe 2020-09-16 14:12:18 +05:30
sa1100-cpufreq.c
sa1110-cpufreq.c
sc520_freq.c cpufreq: Convert to new X86 CPU match macros 2020-03-24 21:31:27 +01:00
scmi-cpufreq.c cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() 2024-01-25 14:37:40 -08:00
scpi-cpufreq.c cpufreq: scpi: Add missing MODULE_ALIAS 2020-12-30 11:53:38 +01:00
sfi-cpufreq.c
sh-cpufreq.c cpufreq: Avoid creating excessively large stack frames 2020-01-27 10:33:33 +01:00
sparc-us2e-cpufreq.c
sparc-us3-cpufreq.c
spear-cpufreq.c
speedstep-centrino.c cpufreq: Convert to new X86 CPU match macros 2020-03-24 21:31:27 +01:00
speedstep-ich.c cpufreq: Convert to new X86 CPU match macros 2020-03-24 21:31:27 +01:00
speedstep-lib.c cpufreq: speedstep: remove unneeded semicolon 2020-10-28 18:04:07 +01:00
speedstep-lib.h
speedstep-smi.c cpufreq: Convert to new X86 CPU match macros 2020-03-24 21:31:27 +01:00
sti-cpufreq.c cpufreq: st: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:53:38 +01:00
sun50i-cpufreq-nvmem.c cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe 2022-05-09 09:05:03 +02:00
tango-cpufreq.c
tegra20-cpufreq.c cpufreq: Use of_property_present() for testing DT property presence 2024-01-25 14:37:40 -08:00
tegra124-cpufreq.c
tegra186-cpufreq.c cpufreq: tegra186: Fix get frequency callback 2020-11-17 10:04:21 +05:30
tegra194-cpufreq.c cpufreq: replace cpu_logical_map() with read_cpuid_mpir() 2020-08-21 20:17:01 +02:00
ti-cpufreq.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vexpress-spc-cpufreq.c cpufreq: vexpress-spc: Add missing MODULE_ALIAS 2020-12-30 11:53:38 +01:00