diff options
Diffstat (limited to 'drivers/acpi/acpica/nspredef.c')
-rw-r--r-- | drivers/acpi/acpica/nspredef.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index 9fb03fa8ffde..c845c8089f39 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c | |||
@@ -193,14 +193,20 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, | |||
193 | } | 193 | } |
194 | 194 | ||
195 | /* | 195 | /* |
196 | * 1) We have a return value, but if one wasn't expected, just exit, this is | 196 | * Return value validation and possible repair. |
197 | * not a problem. For example, if the "Implicit Return" feature is | ||
198 | * enabled, methods will always return a value. | ||
199 | * | 197 | * |
200 | * 2) If the return value can be of any type, then we cannot perform any | 198 | * 1) Don't perform return value validation/repair if this feature |
201 | * validation, exit. | 199 | * has been disabled via a global option. |
200 | * | ||
201 | * 2) We have a return value, but if one wasn't expected, just exit, | ||
202 | * this is not a problem. For example, if the "Implicit Return" | ||
203 | * feature is enabled, methods will always return a value. | ||
204 | * | ||
205 | * 3) If the return value can be of any type, then we cannot perform | ||
206 | * any validation, just exit. | ||
202 | */ | 207 | */ |
203 | if ((!predefined->info.expected_btypes) || | 208 | if (acpi_gbl_disable_auto_repair || |
209 | (!predefined->info.expected_btypes) || | ||
204 | (predefined->info.expected_btypes == ACPI_RTYPE_ALL)) { | 210 | (predefined->info.expected_btypes == ACPI_RTYPE_ALL)) { |
205 | goto cleanup; | 211 | goto cleanup; |
206 | } | 212 | } |
@@ -212,6 +218,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, | |||
212 | goto cleanup; | 218 | goto cleanup; |
213 | } | 219 | } |
214 | data->predefined = predefined; | 220 | data->predefined = predefined; |
221 | data->node = node; | ||
215 | data->node_flags = node->flags; | 222 | data->node_flags = node->flags; |
216 | data->pathname = pathname; | 223 | data->pathname = pathname; |
217 | 224 | ||