Skip to contentSkip to conversation

ghes: don't return 0 even when failed to read estatus in ghes_proc()

PATCH New Ethan Zhao 1 participant 1 message Dec 27, 2013

Subsystems (2)
lore
Share & tools
lore

Ethan Zhao

author
#0 lore raw

PATCH 1/1 ghes: don't return 0 even when failed to read estatus in ghes_proc()

ghes_proc() always return 0 even failed to read estatus, so when it is called in interrupt handler ghes_irq_func(), we don't know the interrupt was handled well or not, because the ghes_irq_func() will return only IRQ_HANDLED.

---
 drivers/acpi/apei/ghes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/apei/ghes.c +2 -2
index 8ec37bb..9368b73 100644
@@ -665,7 +665,7 @@ static void ghes_estatus_cache_add(
 
 static int ghes_proc(struct ghes *ghes)
 {
-	int rc;
+	int rc = 0;
 
 	rc = ghes_read_estatus(ghes, 0);
 	if (rc)
@@ -677,7 +677,7 @@ static int ghes_proc(struct ghes *ghes)
 	ghes_do_proc(ghes, ghes->estatus);
 out:
 	ghes_clear_estatus(ghes);
-	return 0;
+	return rc;
 }
 
 static void ghes_add_timer(struct ghes *ghes)
Signature · 1 line
1.8.3.4 (Apple Git-47)