summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-05-05 13:36:56 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-05-13 21:04:00 +0200
commitc2114dbda05354dbcf4dfbb30a2c623e8611c43a (patch)
treea8f96ff36076647cac98db86b569d1f4e678a421 /include
parent499274d078d0c9299af671bcaaecbd9c90571539 (diff)
downloadlwn-c2114dbda05354dbcf4dfbb30a2c623e8611c43a.tar.gz
lwn-c2114dbda05354dbcf4dfbb30a2c623e8611c43a.zip
thermal: hwmon: Fix critical temperature attribute removal
Since the return value of thermal_zone_crit_temp_valid() depends on the behavior of the thermal zone .get_crit_temp() callback which may change over time in theory, thermal_remove_hwmon_sysfs() may attempt to remove a critical temperature attribute that has not been created, passing a pointer to an uninitialized attribute structure to device_remove_file(). To avoid that, set a flag in struct thermal_hwmon_temp after creating a critical temperature attribute and use the value of that flag to decide whether or not the attribute needs to be removed. Fixes: e8db5d6736a7 ("thermal: hwmon: Make the check for critical temp valid consistent") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/2437056.ElGaqSPkdT@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions