summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2011-03-23 07:33:46 +0100
committerLen Brown <len.brown@intel.com>2011-03-23 07:33:46 +0100
commit797b10a07069e153d41aedb4ae8e76660279e2ee (patch)
tree385b331211ebb63d6c012383693f3884ec2229cb /drivers
parentMerge branch 'misc' into release (diff)
parentThermal_Framework-Fix_crash_during_hwmon_unregister (diff)
downloadlinux-797b10a07069e153d41aedb4ae8e76660279e2ee.tar.xz
linux-797b10a07069e153d41aedb4ae8e76660279e2ee.zip
Merge branch 'bugfix-thermal' into release
Diffstat (limited to 'drivers')
-rw-r--r--drivers/thermal/thermal_sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 713b7ea4a607..fc6f2a5bde01 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -560,7 +560,8 @@ thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
tz->hwmon = NULL;
device_remove_file(hwmon->device, &tz->temp_input.attr);
- device_remove_file(hwmon->device, &tz->temp_crit.attr);
+ if (tz->ops->get_crit_temp)
+ device_remove_file(hwmon->device, &tz->temp_crit.attr);
mutex_lock(&thermal_list_lock);
list_del(&tz->hwmon_node);