Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1403858 > unrolled thread
| Started by | Matthias Brugger <mbrugger@suse.com> |
|---|---|
| First post | 2016-05-19 19:00 +0200 |
| Last post | 2016-05-20 10:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ACPI / tables: Return error from table parse handler Matthias Brugger <mbrugger@suse.com> - 2016-05-19 19:00 +0200
Re: [PATCH] ACPI / tables: Return error from table parse handler "Rafael J. Wysocki" <rafael@kernel.org> - 2016-05-19 23:20 +0200
Re: [PATCH] ACPI / tables: Return error from table parse handler Matthias Brugger <mbrugger@suse.com> - 2016-05-20 10:20 +0200
| From | Matthias Brugger <mbrugger@suse.com> |
|---|---|
| Date | 2016-05-19 19:00 +0200 |
| Subject | [PATCH] ACPI / tables: Return error from table parse handler |
| Message-ID | <rAzsJ-2iP-9@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-05-19 23:20 +0200 |
| Message-ID | <rADwm-55w-15@gated-at.bofh.it> |
| In reply to | #1403858 |
On Thu, May 19, 2016 at 6:51 PM, Matthias Brugger <mbrugger@suse.com> wrote:
> The handler called in acpi_table_parse may return an error.
> This patch returns this error instead of ignoring it.
And does it address any particular practical problem or is it just a
code cleanup?
> 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;
> }
> --
[toc] | [prev] | [next] | [standalone]
| From | Matthias Brugger <mbrugger@suse.com> |
|---|---|
| Date | 2016-05-20 10:20 +0200 |
| Message-ID | <rANP3-35u-3@gated-at.bofh.it> |
| In reply to | #1403967 |
On 19/05/16 23:17, Rafael J. Wysocki wrote:
> On Thu, May 19, 2016 at 6:51 PM, Matthias Brugger <mbrugger@suse.com> wrote:
>> The handler called in acpi_table_parse may return an error.
>> This patch returns this error instead of ignoring it.
>
> And does it address any particular practical problem or is it just a
> code cleanup?
>
It's just a code cleanup.
>> 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;
>> }
>> --
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web