aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2018-01-03 18:06:22 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-04 19:33:22 -0500
commit896bece7eccb0e756cf91ac92479d764a8a28f5b (patch)
treee93a09381c91070b44c02ade175a1b01bad05fb9
parent6be2d72b186497079aeb63d5730cb84393566fd3 (diff)
ACPICA: Fix a regression in the acpi_evaluate_object_type() interface
ACPICA commit 9ab548ef154b992208524d61770caca90a9762be The optional Pathname parameter inadvertently became required. Introduced in April 2017. Link: https://github.com/acpica/acpica/commit/9ab548ef Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/nsxfeval.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index 783f4c838aee..9b51f65823b2 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -61,10 +61,10 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info);
61 * 61 *
62 * PARAMETERS: handle - Object handle (optional) 62 * PARAMETERS: handle - Object handle (optional)
63 * pathname - Object pathname (optional) 63 * pathname - Object pathname (optional)
64 * external_params - List of parameters to pass to method, 64 * external_params - List of parameters to pass to a method,
65 * terminated by NULL. May be NULL 65 * terminated by NULL. May be NULL
66 * if no parameters are being passed. 66 * if no parameters are being passed.
67 * return_buffer - Where to put method's return value (if 67 * return_buffer - Where to put the object's return value (if
68 * any). If NULL, no value is returned. 68 * any). If NULL, no value is returned.
69 * return_type - Expected type of return object 69 * return_type - Expected type of return object
70 * 70 *
@@ -100,13 +100,14 @@ acpi_evaluate_object_typed(acpi_handle handle,
100 free_buffer_on_error = TRUE; 100 free_buffer_on_error = TRUE;
101 } 101 }
102 102
103 /* Get a handle here, in order to build an error message if needed */
104
105 target_handle = handle;
103 if (pathname) { 106 if (pathname) {
104 status = acpi_get_handle(handle, pathname, &target_handle); 107 status = acpi_get_handle(handle, pathname, &target_handle);
105 if (ACPI_FAILURE(status)) { 108 if (ACPI_FAILURE(status)) {
106 return_ACPI_STATUS(status); 109 return_ACPI_STATUS(status);
107 } 110 }
108 } else {
109 target_handle = handle;
110 } 111 }
111 112
112 full_pathname = acpi_ns_get_external_pathname(target_handle); 113 full_pathname = acpi_ns_get_external_pathname(target_handle);