From 57336224da8340fd503e1cc325cc9e0875ccc9a6 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Mon, 5 Dec 2022 19:56:14 +0100 Subject: 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 --- drivers/acpi/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/acpi') 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) { -- cgit v1.2.3