]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ACPI: thermal: drop an always true check
authorAdam Borowski <kilobyte@angband.pl>
Mon, 15 Nov 2021 17:32:08 +0000 (18:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:29:01 +0000 (10:29 +0200)
commit e5b5d25444e9ee3ae439720e62769517d331fa39 upstream.

Address of a field inside a struct can't possibly be null; gcc-12 warns
about this.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/thermal.c

index 383c7029d3cee04b60fa3de395cad5b683e7cf8c..e9c16b7ddd8b02317b1afefcec4b8d0748ac533b 100644 (file)
@@ -1153,8 +1153,6 @@ static int acpi_thermal_resume(struct device *dev)
                return -EINVAL;
 
        for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
-               if (!(&tz->trips.active[i]))
-                       break;
                if (!tz->trips.active[i].flags.valid)
                        break;
                tz->trips.active[i].flags.enabled = 1;