diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-12-05 21:56:14 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-12-07 20:06:00 +0300 |
commit | 57336224da8340fd503e1cc325cc9e0875ccc9a6 (patch) | |
tree | 4194a75ea71c35a990bfa535c319406a6379c997 /drivers/acpi | |
parent | 76dcd734eca23168cb008912c0f69ff408905235 (diff) | |
download | linux-57336224da8340fd503e1cc325cc9e0875ccc9a6.tar.xz |
ACPI: thermal: Adjust critical.flags.valid check
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/thermal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 40b07057983e..2e1428334e47 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -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) { |