From: Adam Borowski <[email protected]>

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

Signed-off-by: Adam Borowski <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>

Backport e5b5d25444e9ee3ae439720e62769517d331fa39 from mainline to fix build 
error when we enable -Werror.
drivers/acpi/thermal.c:1101:21: error: the comparison will always evaluate as
'true' for the address of 'active' will never be NULL [-Waddress]
Signed-off-by: He Zhe <[email protected]>
---
 drivers/acpi/thermal.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 95105db642b9..155bbabcc6f5 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -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;
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11364): 
https://lists.yoctoproject.org/g/linux-yocto/message/11364
Mute This Topic: https://lists.yoctoproject.org/mt/91470570/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to