Skip to content

Commit

Permalink
ACPI: thermal: Adjust critical.flags.valid check
Browse files Browse the repository at this point in the history
It is not necessary to compare critical.flags.valid to 1 in
acpi_thermal_trips_update() and doing so is also inconsistent with
other similar checks in that code, so simply check if the flag is
not 0 instead.

No expected functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Dec 7, 2022
1 parent 76dcd73 commit 5733622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
"Found critical threshold [%lu]\n",
tz->trips.critical.temperature);
}
if (tz->trips.critical.flags.valid == 1) {
if (tz->trips.critical.flags.valid) {
if (crt == -1) {
tz->trips.critical.flags.valid = 0;
} else if (crt > 0) {
Expand Down

0 comments on commit 5733622

Please sign in to comment.