From: Rafael J. Wysocki Date: Mon, 7 Aug 2023 18:01:24 +0000 (+0200) Subject: thermal: core: Do not handle trip points with invalid temperature X-Git-Tag: block-6.6-2023-09-08~38^2~2^2~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=bc840ea5f9a9;p=linux-block.git 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 Acked-by: Daniel Lezcano --- diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 842f678c1c3e..b38abe8a080a 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -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);