From: Ethan Zhao <ethan.kernel@gmail.com>
To: ying.huang@intel.com, tony.luck@intel.com
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Ethan Zhao <ethan.kernel@gmail.com>
Subject: [PATCH] ghes: don't return 0 even when failed to read estatus in ghes_proc()
Date: Fri, 27 Dec 2013 22:38:40 +0800 [thread overview]
Message-ID: <1388155120-419-1-git-send-email-ethan.kernel@gmail.com> (raw)
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.
Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
---
drivers/acpi/apei/ghes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 8ec37bb..9368b73 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -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)
--
1.8.3.4 (Apple Git-47)
reply other threads:[~2013-12-27 14:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388155120-419-1-git-send-email-ethan.kernel@gmail.com \
--to=ethan.kernel@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox