thermal/core: Protect thermal device operations against thermal device removal
authorGuenter Roeck <linux@roeck-us.net>
Thu, 10 Nov 2022 15:25:00 +0000 (07:25 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 14 Nov 2022 18:04:37 +0000 (19:04 +0100)
commitb778b4d782d48b9a8751b21deb8eb2f054a3c772
tree1b484f24cc78e9ea25c3ce26ac89358c93ce68f4
parent91b3aafc2238a91051dff79a8d072a18c805ee50
thermal/core: Protect thermal device operations against thermal device removal

Thermal device operations may be called after thermal zone device removal.
After thermal zone device removal, thermal zone device operations must
no longer be called. To prevent such calls from happening, ensure that
the thermal device is registered before executing any thermal device
operations.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_core.c