[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220831034824.302320-1-ye.xingchen@zte.com.cn>
Date: Wed, 31 Aug 2022 03:48:24 +0000
From: cgel.zte@...il.com
To: rafael@...nel.org
Cc: lenb@...nel.org, james.morse@....com, tony.luck@...el.com,
bp@...en8.de, wangxiang@...rlc.com, jakobkoschel@...il.com,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] ACPI: APEI: Remove the unneeded result variable 'rc'
From: ye xingchen <ye.xingchen@....com.cn>
Return the value apei_exec_write_register() 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/apei/apei-base.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
index 9f49272cad39..9b52482b4ed5 100644
--- a/drivers/acpi/apei/apei-base.c
+++ b/drivers/acpi/apei/apei-base.c
@@ -125,12 +125,9 @@ EXPORT_SYMBOL_GPL(apei_exec_write_register);
int apei_exec_write_register_value(struct apei_exec_context *ctx,
struct acpi_whea_header *entry)
{
- int rc;
-
ctx->value = entry->value;
- rc = apei_exec_write_register(ctx, entry);
- return rc;
+ return apei_exec_write_register(ctx, entry);
}
EXPORT_SYMBOL_GPL(apei_exec_write_register_value);
--
2.25.1
Powered by blists - more mailing lists