ACPI / tables: Return proper error codes from acpi_table_parse() and fix comment.

The comment about return value of acpi_table_parse() is incorrect.
This patch fix it.

Since all callers only check if the function succeeded or not, this
patch simplifies the semantics by returning -errno for all failure
cases. This will also simply the comment.

As suggested by Toshi Kani <toshi.kani@hp.com>, also change the stub
in linux/acpi.h to return -ENODEV.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
tangchen 2014-01-06 16:47:59 +08:00 committed by Rafael J. Wysocki
parent de2d1a7e93
commit f8a571b2a1
2 changed files with 4 additions and 3 deletions

View file

@ -461,7 +461,7 @@ struct acpi_table_header;
static inline int acpi_table_parse(char *id,
int (*handler)(struct acpi_table_header *))
{
return -1;
return -ENODEV;
}
static inline int acpi_nvs_register(__u64 start, __u64 size)