| .. | .. |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * Module Name: nsrepair - Repair for objects returned by predefined methods |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * Copyright (C) 2000 - 2018, Intel Corp. |
|---|
| 6 | + * Copyright (C) 2000 - 2020, Intel Corp. |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | *****************************************************************************/ |
|---|
| 9 | 9 | |
|---|
| .. | .. |
|---|
| 181 | 181 | * Try to fix if there was no return object. Warning if failed to fix. |
|---|
| 182 | 182 | */ |
|---|
| 183 | 183 | 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) { |
|---|
| 186 | 187 | ACPI_WARN_PREDEFINED((AE_INFO, |
|---|
| 187 | 188 | info->full_pathname, |
|---|
| 188 | 189 | ACPI_WARN_ALWAYS, |
|---|
| .. | .. |
|---|
| 196 | 197 | if (ACPI_SUCCESS(status)) { |
|---|
| 197 | 198 | return (AE_OK); /* Repair was successful */ |
|---|
| 198 | 199 | } |
|---|
| 199 | | - } else { |
|---|
| 200 | + } |
|---|
| 201 | + |
|---|
| 202 | + if (expected_btypes != ACPI_RTYPE_NONE) { |
|---|
| 200 | 203 | ACPI_WARN_PREDEFINED((AE_INFO, |
|---|
| 201 | 204 | info->full_pathname, |
|---|
| 202 | 205 | ACPI_WARN_ALWAYS, |
|---|
| 203 | 206 | "Missing expected return value")); |
|---|
| 207 | + return (AE_AML_NO_RETURN_VALUE); |
|---|
| 204 | 208 | } |
|---|
| 205 | | - |
|---|
| 206 | | - return (AE_AML_NO_RETURN_VALUE); |
|---|
| 207 | 209 | } |
|---|
| 208 | 210 | } |
|---|
| 209 | 211 | |
|---|
| .. | .. |
|---|
| 316 | 318 | |
|---|
| 317 | 319 | this_name = acpi_object_repair_info; |
|---|
| 318 | 320 | 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)) { |
|---|
| 320 | 322 | |
|---|
| 321 | 323 | /* Check if we can actually repair this name/type combination */ |
|---|
| 322 | 324 | |
|---|