mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-22 18:09:40 +07:00
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>
This commit is contained in:
parent
40411255c8
commit
02d4fb3686
@ -112,9 +112,15 @@ acpi_ns_check_package(struct acpi_predefined_data *data,
|
|||||||
elements = return_object->package.elements;
|
elements = return_object->package.elements;
|
||||||
count = return_object->package.count;
|
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 (!count) {
|
||||||
|
if (package->ret_info.type == ACPI_PTYPE1_VAR) {
|
||||||
|
return (AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
ACPI_WARN_PREDEFINED((AE_INFO, data->pathname, data->node_flags,
|
ACPI_WARN_PREDEFINED((AE_INFO, data->pathname, data->node_flags,
|
||||||
"Return Package has no elements (empty)"));
|
"Return Package has no elements (empty)"));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user