hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/acpi/acpica/nsrepair.c
....@@ -3,7 +3,7 @@
33 *
44 * Module Name: nsrepair - Repair for objects returned by predefined methods
55 *
6
- * Copyright (C) 2000 - 2018, Intel Corp.
6
+ * Copyright (C) 2000 - 2020, Intel Corp.
77 *
88 *****************************************************************************/
99
....@@ -181,8 +181,9 @@
181181 * Try to fix if there was no return object. Warning if failed to fix.
182182 */
183183 if (!return_object) {
184
- if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) {
185
- if (package_index != ACPI_NOT_PACKAGE_ELEMENT) {
184
+ if (expected_btypes) {
185
+ if (!(expected_btypes & ACPI_RTYPE_NONE) &&
186
+ package_index != ACPI_NOT_PACKAGE_ELEMENT) {
186187 ACPI_WARN_PREDEFINED((AE_INFO,
187188 info->full_pathname,
188189 ACPI_WARN_ALWAYS,
....@@ -196,14 +197,15 @@
196197 if (ACPI_SUCCESS(status)) {
197198 return (AE_OK); /* Repair was successful */
198199 }
199
- } else {
200
+ }
201
+
202
+ if (expected_btypes != ACPI_RTYPE_NONE) {
200203 ACPI_WARN_PREDEFINED((AE_INFO,
201204 info->full_pathname,
202205 ACPI_WARN_ALWAYS,
203206 "Missing expected return value"));
207
+ return (AE_AML_NO_RETURN_VALUE);
204208 }
205
-
206
- return (AE_AML_NO_RETURN_VALUE);
207209 }
208210 }
209211
....@@ -316,7 +318,7 @@
316318
317319 this_name = acpi_object_repair_info;
318320 while (this_name->object_converter) {
319
- if (ACPI_COMPARE_NAME(node->name.ascii, this_name->name)) {
321
+ if (ACPI_COMPARE_NAMESEG(node->name.ascii, this_name->name)) {
320322
321323 /* Check if we can actually repair this name/type combination */
322324