From: Matthias Brugger <mbrugger@suse.com>
To: rjw@rjwysocki.net
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Matthias Brugger <mbrugger@suse.com>
Subject: [PATCH] ACPI / tables: Return error from table parse handler
Date: Thu, 19 May 2016 18:51:07 +0200 [thread overview]
Message-ID: <1463676667-17945-1-git-send-email-mbrugger@suse.com> (raw)
The handler called in acpi_table_parse may return an error.
This patch returns this error instead of ignoring it.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
---
drivers/acpi/tables.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index a372f9e..fb5cd80 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -394,6 +394,7 @@ int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler)
{
struct acpi_table_header *table = NULL;
acpi_size tbl_size;
+ int ret;
if (acpi_disabled)
return -ENODEV;
@@ -407,9 +408,9 @@ int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler)
acpi_get_table_with_size(id, 0, &table, &tbl_size);
if (table) {
- handler(table);
+ ret = handler(table);
early_acpi_os_unmap_memory(table, tbl_size);
- return 0;
+ return ret;
} else
return -ENODEV;
}
--
2.6.6
next reply other threads:[~2016-05-19 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 16:51 Matthias Brugger [this message]
2016-05-19 21:17 ` [PATCH] ACPI / tables: Return error from table parse handler Rafael J. Wysocki
2016-05-20 8:11 ` Matthias Brugger
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=1463676667-17945-1-git-send-email-mbrugger@suse.com \
--to=mbrugger@suse.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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