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>
[Linux commit
95df812dbdc350bfcf31e247e9100c378a472480]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
if (table) {
return handler(table);
} else
- return 1;
+ return -ENODEV;
}
/*
status = acpi_initialize_tables(NULL, ACPI_MAX_TABLES, 0);
if (ACPI_FAILURE(status))
- return 1;
+ return -EINVAL;
check_multiple_madt();
return 0;