public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/acpi/apei/erst: remove unneeded rc variable
@ 2022-01-18  7:53 cgel.zte
  2022-01-18  8:56 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-01-18  7:53 UTC (permalink / raw)
  To: keescook
  Cc: anton, ccross, tony.luck, rafael, lenb, james.morse, bp,
	linux-acpi, linux-kernel, Minghao Chi, Zeal Robot, CGEL ZTE

From: Minghao Chi <chi.minghao@zte.com.cn>

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-18  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-18  7:53 [PATCH] drivers/acpi/apei/erst: remove unneeded rc variable cgel.zte
2022-01-18  8:56 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox