Skip to content
Commit 8c7aa184 authored by Stefan Mavrodiev's avatar Stefan Mavrodiev Committed by Zhang Rui
Browse files

thermal_hwmon: Sanitize thermal_zone type



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: 409ef0ba ("thermal_hwmon: Sanitize attribute name passed to hwmon")

Signed-off-by: default avatarStefan Mavrodiev <stefan@olimex.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent d1abaeb3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment