diff mbox

ACPI / table: Replace '1' with specific error in return value

Message ID 1386258158-10056-1-git-send-email-hanjun.guo@linaro.org
State Accepted
Commit 95df812dbdc350bfcf31e247e9100c378a472480
Headers show

Commit Message

Hanjun Guo Dec. 5, 2013, 3:42 p.m. UTC
In commit 7f8f97c3cc (ACPI: acpi_table_parse() now returns success/fail,
not count), it return '1' when no table found, replace -ENODEV here
to make it more resonable.

Fix the same problem in acpi_table_init() too.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
 drivers/acpi/tables.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index d67a1fe..4ec4425 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)
 		early_acpi_os_unmap_memory(table, tbl_size);
 		return 0;
 	} else
-		return 1;
+		return -ENODEV;
 }
 
 /* 
@@ -351,7 +351,7 @@  int __init acpi_table_init(void)
 
 	status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
 	if (ACPI_FAILURE(status))
-		return 1;
+		return -EINVAL;
 
 	check_multiple_madt();
 	return 0;