mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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>
This commit is contained in:
parent
1996e9d732
commit
bc840ea5f9
1 changed files with 2 additions and 1 deletions
|
@ -348,7 +348,8 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip_id)
|
|||
struct thermal_trip trip;
|
||||
|
||||
/* Ignore disabled trip points */
|
||||
if (test_bit(trip_id, &tz->trips_disabled))
|
||||
if (test_bit(trip_id, &tz->trips_disabled) ||
|
||||
trip.temperature == THERMAL_TEMP_INVALID)
|
||||
return;
|
||||
|
||||
__thermal_zone_get_trip(tz, trip_id, &trip);
|
||||
|
|
Loading…
Reference in a new issue