Re: [PATCH] ACPI: thermal: drop an always true check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 15, 2021 at 6:55 PM Adam Borowski <kilobyte@xxxxxxxxxx> wrote:
>
> Address of a field inside a struct can't possibly be null; gcc-12 warns
> about this.
>
> Signed-off-by: Adam Borowski <kilobyte@xxxxxxxxxx>
> ---
>  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;
> --

Applied as 5.16-rc material, thanks!



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux