Skip to content

Commit

Permalink
ACPI: thermal: drop an always true check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adam Borowski authored and Rafael J. Wysocki committed Nov 16, 2021
1 parent fa55b7d commit e5b5d25
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,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;
Expand Down

0 comments on commit e5b5d25

Please sign in to comment.