]> err.no Git - linux-2.6/blobdiff - drivers/acpi/executer/exoparg6.c
Merge commit 'v2.6.26-rc9' into cpus4096
[linux-2.6] / drivers / acpi / executer / exoparg6.c
index 05e7f9b67f29c3893683e2d0921f480d5abe0ebd..67d48737af5360011b7facec5aa909d62f2d9425 100644 (file)
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -220,7 +220,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
        acpi_integer index;
        union acpi_operand_object *this_element;
 
-       ACPI_FUNCTION_TRACE_STR("ex_opcode_6A_0T_1R",
+       ACPI_FUNCTION_TRACE_STR(ex_opcode_6A_0T_1R,
                                acpi_ps_get_opcode_name(walk_state->opcode));
 
        switch (walk_state->opcode) {
@@ -234,7 +234,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
 
                if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) ||
                    (operand[3]->integer.value > MAX_MATCH_OPERATOR)) {
-                       ACPI_REPORT_ERROR(("Match operator out of range\n"));
+                       ACPI_ERROR((AE_INFO, "Match operator out of range"));
                        status = AE_AML_OPERAND_VALUE;
                        goto cleanup;
                }
@@ -243,7 +243,10 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
 
                index = operand[5]->integer.value;
                if (index >= operand[0]->package.count) {
-                       ACPI_REPORT_ERROR(("Index (%X%8.8X) beyond package end (%X)\n", ACPI_FORMAT_UINT64(index), operand[0]->package.count));
+                       ACPI_ERROR((AE_INFO,
+                                   "Index (%X%8.8X) beyond package end (%X)",
+                                   ACPI_FORMAT_UINT64(index),
+                                   operand[0]->package.count));
                        status = AE_AML_PACKAGE_LIMIT;
                        goto cleanup;
                }
@@ -273,6 +276,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
                 * match was found.
                 */
                for (; index < operand[0]->package.count; index++) {
+
                        /* Get the current package element */
 
                        this_element = operand[0]->package.elements[index];
@@ -312,14 +316,12 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
 
        default:
 
-               ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
-                                  walk_state->opcode));
+               ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
+                           walk_state->opcode));
                status = AE_AML_BAD_OPCODE;
                goto cleanup;
        }
 
-       walk_state->result_obj = return_desc;
-
       cleanup:
 
        /* Delete return object on error */
@@ -328,5 +330,11 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
                acpi_ut_remove_reference(return_desc);
        }
 
+       /* Save return object on success */
+
+       else {
+               walk_state->result_obj = return_desc;
+       }
+
        return_ACPI_STATUS(status);
 }