Skip to contentSkip to conversation

ACPI: APEI: remove redundant assignment to variable rc

PATCH Applied Colin King 2 participants 2 messages Jul 22, 2020 – Jul 27, 2020

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ACPI: APEI: remove redundant assignment to variable rc

From: Colin Ian King <[email protected]>

The variable rc is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/acpi/apei/hest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/apei/hest.c +1 -1
index 953a2fae8b15..6e980fe16772 100644
@@ -227,7 +227,7 @@ __setup("hest_disable", setup_hest_disable);
 void __init acpi_hest_init(void)
 {
 	acpi_status status;
-	int rc = -ENODEV;
+	int rc;
 	unsigned int ghes_count = 0;
 
 	if (hest_disable) {
Signature · 1 line
2.27.0
maintainer Applied
#1 lore raw
Quoted 18 lines · Colin King

From: Colin Ian King <[email protected]>

The variable rc is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/acpi/apei/hest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/apei/hest.c +0 -0
index 953a2fae8b15..6e980fe16772 100644

drivers/acpi/apei/hest.c __setup("hest_disable", setup_hest_disable);

Quoted 9 lines
drivers/acpi/apei/hest.c +1 -2
@@ -227,7 +227,7 @@ __setup("hest_disable", setup_hest_disable);
 void __init acpi_hest_init(void)
 {
        acpi_status status;
-       int rc = -ENODEV;
+       int rc;
        unsigned int ghes_count = 0;
 
        if (hest_disable) {
--

Applied as 5.9 material, thanks!