[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jJ1Lzk4ZJ3QWpwQiJot0T2Jx0e8=0iXGYGU7+0gvgPXw@mail.gmail.com>
Date: Sat, 3 Sep 2022 20:33:01 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: cgel.zte@...il.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>,
ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] ACPI: EC: Remove the unneeded result variable
On Thu, Aug 25, 2022 at 9:27 AM <cgel.zte@...il.com> wrote:
>
> From: ye xingchen <ye.xingchen@....com.cn>
>
> Return the value acpi_ec_write() directly instead of storing it in
> another redundant variable.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
> ---
> drivers/acpi/ec.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index c95e535035a0..9b42628cf21b 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -917,14 +917,10 @@ EXPORT_SYMBOL(ec_read);
>
> int ec_write(u8 addr, u8 val)
> {
> - int err;
> -
> if (!first_ec)
> return -ENODEV;
>
> - err = acpi_ec_write(first_ec, addr, val);
> -
> - return err;
> + return acpi_ec_write(first_ec, addr, val);
> }
> EXPORT_SYMBOL(ec_write);
>
> --
Applied as 6.1 material with some edits in the subject and changelog.
Thanks!
Powered by blists - more mailing lists