From: Len Brown Date: Wed, 23 Mar 2011 06:33:46 +0000 (-0400) Subject: Merge branch 'bugfix-thermal' into release X-Git-Tag: firefly_0821_release~7613^2~1818^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=797b10a07069e153d41aedb4ae8e76660279e2ee;hp=8a9026d2e91b2c46744396222b0e878b2622c567;p=firefly-linux-kernel-4.4.55.git Merge branch 'bugfix-thermal' into release --- 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);