diff options
author | Hanjun Guo <hanjun.guo@linaro.org> | 2013-12-05 10:42:38 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-12-06 19:31:59 -0500 |
commit | 95df812dbdc350bfcf31e247e9100c378a472480 (patch) | |
tree | 6799159c69b74f6b062060666246ac7522e6d0e9 | |
parent | cad1525a5e7443cd93368a22e5b7571c373c8cc0 (diff) |
ACPI / table: Replace '1' with specific error return values
After commit 7f8f97c3cc (ACPI: acpi_table_parse() now returns
success/fail, not count), acpi_table_parse() returns '1' when it is
unable to find the table, but it should return a negative error code
in that case. Make it return -ENODEV instead.
Fix the same problem in acpi_table_init() analogously.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
[rjw: Subject and changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/tables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index d67a1fe07f0e..4ec44258e4ff 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -306,7 +306,7 @@ int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler) | |||
306 | early_acpi_os_unmap_memory(table, tbl_size); | 306 | early_acpi_os_unmap_memory(table, tbl_size); |
307 | return 0; | 307 | return 0; |
308 | } else | 308 | } else |
309 | return 1; | 309 | return -ENODEV; |
310 | } | 310 | } |
311 | 311 | ||
312 | /* | 312 | /* |
@@ -351,7 +351,7 @@ int __init acpi_table_init(void) | |||
351 | 351 | ||
352 | status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0); | 352 | status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0); |
353 | if (ACPI_FAILURE(status)) | 353 | if (ACPI_FAILURE(status)) |
354 | return 1; | 354 | return -EINVAL; |
355 | 355 | ||
356 | check_multiple_madt(); | 356 | check_multiple_madt(); |
357 | return 0; | 357 | return 0; |