lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0ixPr8WN9hdTtqj1S4XakhH9hJSWJSf9EthdyMEScaOhQ@mail.gmail.com>
Date:   Fri, 22 Oct 2021 14:36:26 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Kai Song <songkai01@...pur.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPI: CPPC: fix return value in register_pcc_channel()

On Fri, Oct 22, 2021 at 9:39 AM Kai Song <songkai01@...pur.com> wrote:
>
> It uses IS_ERR to judge the return value of
> pcc_mbox_request_channel().If it is invalid, maybe we should
> use PTR_ERR to get the correct return value.

Either there is a reason to make this change or there isn't.

If there is a reason, then what is it?

> Signed-off-by: Kai Song <songkai01@...pur.com>
> ---
>  drivers/acpi/cppc_acpi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
> index bd482108310c..0bbb5fa27ce7 100644
> --- a/drivers/acpi/cppc_acpi.c
> +++ b/drivers/acpi/cppc_acpi.c
> @@ -503,7 +503,7 @@ static int register_pcc_channel(int pcc_ss_idx)
>                 if (IS_ERR(pcc_data[pcc_ss_idx]->pcc_channel)) {
>                         pr_err("Failed to find PCC channel for subspace %d\n",
>                                pcc_ss_idx);
> -                       return -ENODEV;
> +                       return PTR_ERR(pcc_data[pcc_ss_idx]->pcc_channel);
>                 }
>
>                 /*
> --
> 2.27.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ