thermal: core: Fix disabled trip point check in handle_thermal_trip()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 14 Sep 2023 19:42:20 +0000 (21:42 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 14 Sep 2023 19:51:49 +0000 (21:51 +0200)
commitfb2c10245f201278804a6f28e196e95436059d6d
tree305590437cb404ba342ad374b60bdec4a6297786
parentebc7abb35b258152d4a424f89d7c03db1d7ce61c
thermal: core: Fix disabled trip point check in handle_thermal_trip()

Commit bc840ea5f9a9 ("thermal: core: Do not handle trip points with
invalid temperature") added a check for invalid temperature to the
disabled trip point check in handle_thermal_trip(), but that check was
added at a point when the trip structure has not been initialized yet.

This may cause handle_thermal_trip() to skip a valid trip point in some
cases, so fix it by moving the check to a suitable place, after
__thermal_zone_get_trip() has been called to populate the trip
structure.

Fixes: bc840ea5f9a9 ("thermal: core: Do not handle trip points with invalid temperature")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_core.c