2022-01-19 22:03:16

by CGEL

[permalink] [raw]
Subject: [PATCH] drivers/acpi/apei/erst: remove unneeded rc variable

From: Minghao Chi <[email protected]>

Return value from erst_get_record_id_begin() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
Signed-off-by: CGEL ZTE <[email protected]>
---
drivers/acpi/apei/erst.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index 242f3c2d5533..d9cf07b2a90b 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -952,14 +952,10 @@ static int reader_pos;

static int erst_open_pstore(struct pstore_info *psi)
{
- int rc;
-
if (erst_disable)
return -ENODEV;

- rc = erst_get_record_id_begin(&reader_pos);
-
- return rc;
+ return erst_get_record_id_begin(&reader_pos);
}

static int erst_close_pstore(struct pstore_info *psi)
--
2.25.1


2022-01-19 23:10:02

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH] drivers/acpi/apei/erst: remove unneeded rc variable

On Tue, Jan 18, 2022 at 07:53:49AM +0000, [email protected] wrote:
> From: Minghao Chi <[email protected]>
>
> Return value from erst_get_record_id_begin() directly instead
> of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: Minghao Chi <[email protected]>
> Signed-off-by: CGEL ZTE <[email protected]>

"Well, this doesn't look like an e-mail address of a physical person
which is required for S-o-b tags."

https://lore.kernel.org/r/CAJZ5v0iipOm6DX3Fd8iNKF_LC6kJWCy=1LxFsh47z01UYDrRow@mail.gmail.com

Are you people actually reading email feedback or you're automatically
dumping this crap to recipients without even looking?

Because if so, we can automatically send all that crap to /dev/null and
the only thing that's going to be wasted is the energy used to send crap
mails back'n'forth...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette