Commit 382c5fec authored by ye xingchen's avatar ye xingchen Committed by Rafael J. Wysocki

ACPI: APEI: Remove unneeded result variables

Return the erst_get_record_id_begin() and apei_exec_write_register()
return values directly instead of storing them in redundant local
variables.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
[ rjw: Changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 37096428
...@@ -125,12 +125,9 @@ EXPORT_SYMBOL_GPL(apei_exec_write_register); ...@@ -125,12 +125,9 @@ EXPORT_SYMBOL_GPL(apei_exec_write_register);
int apei_exec_write_register_value(struct apei_exec_context *ctx, int apei_exec_write_register_value(struct apei_exec_context *ctx,
struct acpi_whea_header *entry) struct acpi_whea_header *entry)
{ {
int rc;
ctx->value = entry->value; 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); EXPORT_SYMBOL_GPL(apei_exec_write_register_value);
......
...@@ -1020,14 +1020,10 @@ static int reader_pos; ...@@ -1020,14 +1020,10 @@ static int reader_pos;
static int erst_open_pstore(struct pstore_info *psi) static int erst_open_pstore(struct pstore_info *psi)
{ {
int rc;
if (erst_disable) if (erst_disable)
return -ENODEV; return -ENODEV;
rc = erst_get_record_id_begin(&reader_pos); return erst_get_record_id_begin(&reader_pos);
return rc;
} }
static int erst_close_pstore(struct pstore_info *psi) static int erst_close_pstore(struct pstore_info *psi)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment