Commit 02d4fb36 authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki

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: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 40411255
......@@ -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)"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment