summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/nspredef.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-27 03:28:48 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-27 03:28:48 +0400
commitafdca01c9821134e71011029a194dd8fcb88c97e (patch)
treec3a4862547760c3aaae5a8260ba3796a40bf47a6 /drivers/acpi/acpica/nspredef.c
parent4b319f290d3b9c756228a66f72095d0039ec1b50 (diff)
parent36b99b22877bd25162239f1b00477ee6ae2d01ee (diff)
downloadlinux-afdca01c9821134e71011029a194dd8fcb88c97e.tar.xz
Merge branch 'acpica'
* acpica: ACPICA: Update version to 20130725. ACPICA: Update names for walk_namespace callbacks to clarify usage. ACPICA: Return error if DerefOf resolves to a null package element. ACPICA: Make ACPI Power Management Timer (PM Timer) optional. ACPICA: Fix divergences of the commit - ACPICA: Expose OSI version. ACPICA: Fix possible fault for methods that optionally have no return value. ACPICA: DeRefOf operator: Update to fully resolve FieldUnit and BufferField refs. ACPICA: Emit all unresolved method externals in a text block ACPICA: Export acpi_tb_validate_rsdp(). ACPI: Add facility to remove all _OSI strings ACPI: Add facility to disable all _OSI OS vendor strings ACPICA: Add acpi_update_interfaces() public interface ACPICA: Update version to 20130626 ACPICA: Fix compiler warnings for casting issues (only some compilers) ACPICA: Remove restriction of 256 maximum GPEs in any GPE block ACPICA: Disassembler: Expand maximum output string length to 64K ACPICA: TableManager: Export acpi_tb_scan_memory_for_rsdp() ACPICA: Update comments about behavior when _STA does not exist
Diffstat (limited to 'drivers/acpi/acpica/nspredef.c')
-rw-r--r--drivers/acpi/acpica/nspredef.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 24b71a01bf93..098e7666cbc9 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -151,6 +151,15 @@ acpi_ns_check_return_value(struct acpi_namespace_node *node,
}
/*
+ *
+ * 4) If there is no return value and it is optional, just return
+ * AE_OK (_WAK).
+ */
+ if (!(*return_object_ptr)) {
+ goto exit;
+ }
+
+ /*
* For returned Package objects, check the type of all sub-objects.
* Note: Package may have been newly created by call above.
*/
@@ -268,7 +277,12 @@ acpi_ns_check_object_type(struct acpi_evaluate_info *info,
acpi_ut_get_expected_return_types(type_buffer, expected_btypes);
- if (package_index == ACPI_NOT_PACKAGE_ELEMENT) {
+ if (!return_object) {
+ ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname,
+ info->node_flags,
+ "Expected return object of type %s",
+ type_buffer));
+ } else if (package_index == ACPI_NOT_PACKAGE_ELEMENT) {
ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname,
info->node_flags,
"Return type mismatch - found %s, expected %s",