hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/acpi/acpica/nsrepair.c
....@@ -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