Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84ffe3ec authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Zhang Rui
Browse files

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: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 009d0431
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);