diff options
author | Bob Moore | 2013-03-08 10:23:51 +0100 |
---|---|---|
committer | Rafael J. Wysocki | 2013-03-12 00:45:05 +0100 |
commit | 02d4fb36867c33f7e0cec8d6e6dad47ad712a497 (patch) | |
tree | 34b79a95c67e897efa4ff0e7be93247a25918cd9 /drivers/acpi | |
parent | ACPICA: Disassembler: Add warnings for unresolved control methods (diff) | |
download | kernel-qcow2-linux-02d4fb36867c33f7e0cec8d6e6dad47ad712a497.tar.gz kernel-qcow2-linux-02d4fb36867c33f7e0cec8d6e6dad47ad712a497.tar.xz kernel-qcow2-linux-02d4fb36867c33f7e0cec8d6e6dad47ad712a497.zip |
ACPICA: Object repair: Allow 0-length packages for variable-length packages
For the predefined names that return fully variable-length
packages, allow a zero-length package with no warning, since it
is technically a legal construct (and BIOS writers use it.)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/nsprepkg.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/nsprepkg.c b/drivers/acpi/acpica/nsprepkg.c index a40155467d2e..77cdd539de16 100644 --- a/drivers/acpi/acpica/nsprepkg.c +++ b/drivers/acpi/acpica/nsprepkg.c @@ -112,9 +112,15 @@ acpi_ns_check_package(struct acpi_predefined_data *data, elements = return_object->package.elements; count = return_object->package.count; - /* The package must have at least one element, else invalid */ - + /* + * Most packages must have at least one element. The only exception + * is the variable-length package (ACPI_PTYPE1_VAR). + */ if (!count) { + if (package->ret_info.type == ACPI_PTYPE1_VAR) { + return (AE_OK); + } + ACPI_WARN_PREDEFINED((AE_INFO, data->pathname, data->node_flags, "Return Package has no elements (empty)")); |