diff options
| author | Stefan Mavrodiev <stefan@olimex.com> | 2019-07-26 16:32:36 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-11 18:21:19 +0200 |
| commit | 9025adf37ee8d9511756e5d3a1bee54f6cbd72e6 (patch) | |
| tree | 8ee41d10bce40018fb3bb8be8c4dbbe471e12c5a /include | |
| parent | c01a9dbec18af8dbbe6dc75c033003427de68ed8 (diff) | |
thermal_hwmon: Sanitize thermal_zone type
[ Upstream commit 8c7aa184281c01fc26f319059efb94725012921d ]
When calling thermal_add_hwmon_sysfs(), the device type is sanitized by
replacing '-' with '_'. However tz->type remains unsanitized. Thus
calling thermal_hwmon_lookup_by_type() returns no device. And if there is
no device, thermal_remove_hwmon_sysfs() fails with "hwmon device lookup
failed!".
The result is unregisted hwmon devices in the sysfs.
Fixes: 409ef0bacacf ("thermal_hwmon: Sanitize attribute name passed to hwmon")
Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
