diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2014-11-12 15:43:29 -0800 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-06-05 15:42:05 -0700 |
commit | 604b9b1606390d99782790e3a4133d7f52bd6231 (patch) | |
tree | 37db387a271121000537cf1acce6ec2c3f48062a | |
parent | fa6ae46e372f10ffc162fb5c64016a701e0e4adf (diff) |
thermal: core: ignore invalid trip temperature
Ignore invalid trip temperature less or equal to zero. Some
buggy systems have invalid trips, causing system shutdown.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
(cherry picked from commit 84ffe3ecc2c8b3effc41c0babd2cc24f1edb2aab)
Signed-off-by: Kevin Hilman <khilman@linaro.org>
-rw-r--r-- | drivers/thermal/thermal_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 43b90709585f..5aa57736fa9e 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -368,7 +368,7 @@ static void handle_critical_trips(struct thermal_zone_device *tz, tz->ops->get_trip_temp(tz, trip, &trip_temp); /* If we have not crossed the trip_temp, we do not care. */ - if (tz->temperature < trip_temp) + if (trip_temp <= 0 || tz->temperature < trip_temp) return; trace_thermal_zone_trip(tz, trip, trip_type); |