Skip to content

Commit bc840ea

Browse files
committed
thermal: core: Do not handle trip points with invalid temperature
Trip points with temperature set to THERMAL_TEMP_INVALID are as good as disabled, so make handle_thermal_trip() ignore them. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent 1996e9d commit bc840ea

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/thermal/thermal_core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip_id)
348348
struct thermal_trip trip;
349349

350350
/* Ignore disabled trip points */
351-
if (test_bit(trip_id, &tz->trips_disabled))
351+
if (test_bit(trip_id, &tz->trips_disabled) ||
352+
trip.temperature == THERMAL_TEMP_INVALID)
352353
return;
353354

354355
__thermal_zone_get_trip(tz, trip_id, &trip);

0 commit comments

Comments
 (0)