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>
This commit is contained in:
parent
009d0431c3
commit
84ffe3ecc2
1 changed files with 1 additions and 1 deletions
|
@ -368,7 +368,7 @@ static void handle_critical_trips(struct thermal_zone_device *tz,
|
||||||
tz->ops->get_trip_temp(tz, trip, &trip_temp);
|
tz->ops->get_trip_temp(tz, trip, &trip_temp);
|
||||||
|
|
||||||
/* If we have not crossed the trip_temp, we do not care. */
|
/* 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;
|
return;
|
||||||
|
|
||||||
trace_thermal_zone_trip(tz, trip, trip_type);
|
trace_thermal_zone_trip(tz, trip, trip_type);
|
||||||
|
|
Loading…
Add table
Reference in a new issue