Re: [PATCH] ACPICA: acpidump: fix return values in ap_is_valid_checksum()

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

 



On Fri, Aug 29, 2025 at 1:27 PM Kaushlendra Kumar
<kaushlendra.kumar@xxxxxxxxx> wrote:
>
> The function ap_is_valid_checksum() has a boolean name suggesting it
> should return TRUE/FALSE, but incorrectly returns AE_OK on success and
> has no explicit return on failure, leading to undefined behavior.
>
> Fix by returning proper values:
> - FALSE when checksum validation fails
> - TRUE when checksum validation succeeds
>
> Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@xxxxxxxxx>

Please submit ACPICA changes to the upstream ACPICA project on GitHub.

They are not going to be applied directly to the Linux kernel code
unless they are based on existing upstream ACPICA commits.

> ---
>  tools/power/acpi/tools/acpidump/apdump.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/power/acpi/tools/acpidump/apdump.c b/tools/power/acpi/tools/acpidump/apdump.c
> index bf30143efbdc..7a6223aa703c 100644
> --- a/tools/power/acpi/tools/acpidump/apdump.c
> +++ b/tools/power/acpi/tools/acpidump/apdump.c
> @@ -86,9 +86,10 @@ u8 ap_is_valid_checksum(struct acpi_table_header *table)
>         if (ACPI_FAILURE(status)) {
>                 fprintf(stderr, "%4.4s: Warning: wrong checksum in table\n",
>                         table->signature);
> +               return (FALSE);
>         }
>
> -       return (AE_OK);
> +       return (TRUE);
>  }
>
>  /******************************************************************************
> --
> 2.34.1
>





[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