]> git.karo-electronics.de Git - linux-beck.git/commitdiff
thermal: core: ignore invalid trip temperature
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 12 Nov 2014 23:43:29 +0000 (15:43 -0800)
committerZhang Rui <rui.zhang@intel.com>
Mon, 8 Dec 2014 03:51:46 +0000 (11:51 +0800)
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>
drivers/thermal/thermal_core.c

index 43b90709585ff294713e299cca1b6cdac406c098..5aa57736fa9e7011b10a8618847635f26d593401 100644 (file)
@@ -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);