ACPICA: Fixed a problem with CopyObject used in conjunction with the Index operator

The reference was incorrectly dereferenced before the copy. The
reference is now correctly copied.

http://bugzilla.kernel.org/show_bug.cgi?id=5391

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c
index 79a0d28..42c8a0f 100644
--- a/drivers/acpi/executer/exresnte.c
+++ b/drivers/acpi/executer/exresnte.c
@@ -239,12 +239,11 @@
 	case ACPI_TYPE_LOCAL_REFERENCE:
 
 		switch (source_desc->reference.opcode) {
-		case AML_LOAD_OP:
-
-			/* This is a ddb_handle */
-			/* Return an additional reference to the object */
-
+		case AML_LOAD_OP:	/* This is a ddb_handle */
 		case AML_REF_OF_OP:
+		case AML_INDEX_OP:
+
+			/* Return an additional reference to the object */
 
 			obj_desc = source_desc;
 			acpi_ut_add_reference(obj_desc);