From: Minghao Chi <chi.minghao@xxxxxxxxxx> Return value from apei_exec_write_register() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <zealci@xxxxxxxxxx> Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx> Signed-off-by: CGEL ZTE <cgel.zte@xxxxxxxxx> --- 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 c7fdb12c3310..87145b6b89aa 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 apei_exec_write_register(ctx, entry); - return rc; } EXPORT_SYMBOL_GPL(apei_exec_write_register_value); -- 2.25.1