]> git.baikalelectronics.ru Git - kernel.git/commit
int340X/processor_thermal_device: Fix proc_thermal_rapl_remove()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Jul 2019 10:22:57 +0000 (12:22 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 23 Jul 2019 07:36:07 +0000 (09:36 +0200)
commit1e6936f6f0fb3dbf6f4eb0ed044c4baa16ce74ab
treedd19db9582d0ad60cecbe56b7f9a28878eacd8fb
parent15484856ff7af02c67a370dc1c88e75814078d54
int340X/processor_thermal_device: Fix proc_thermal_rapl_remove()

Passing 0 to cpuhp_remove_state() triggers the BUG_ON() in
__cpuhp_remove_state_cpuslocked() and the argument passed to
powercap_unregister_control_type() is expected to be a valid
pointer, so avoid calling these functions with incorrect
arguments from proc_thermal_rapl_remove().

Fixes: 08b41c164a0a ("int340X/processor_thermal_device: add support for MMIO RAPL")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c