diff options
Diffstat (limited to 'drivers/acpi/acpica/nspredef.c')
-rw-r--r-- | drivers/acpi/acpica/nspredef.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index d34fa59548f7..309586f5809c 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c | |||
@@ -1000,27 +1000,25 @@ acpi_ns_check_object_type(struct acpi_predefined_data *data, | |||
1000 | 1000 | ||
1001 | /* Is the object one of the expected types? */ | 1001 | /* Is the object one of the expected types? */ |
1002 | 1002 | ||
1003 | if (!(return_btype & expected_btypes)) { | 1003 | if (return_btype & expected_btypes) { |
1004 | 1004 | ||
1005 | /* Type mismatch -- attempt repair of the returned object */ | 1005 | /* For reference objects, check that the reference type is correct */ |
1006 | 1006 | ||
1007 | status = acpi_ns_repair_object(data, expected_btypes, | 1007 | if (return_object->common.type == ACPI_TYPE_LOCAL_REFERENCE) { |
1008 | package_index, | 1008 | status = acpi_ns_check_reference(data, return_object); |
1009 | return_object_ptr); | ||
1010 | if (ACPI_SUCCESS(status)) { | ||
1011 | return (AE_OK); /* Repair was successful */ | ||
1012 | } | 1009 | } |
1013 | goto type_error_exit; | 1010 | |
1011 | return (status); | ||
1014 | } | 1012 | } |
1015 | 1013 | ||
1016 | /* For reference objects, check that the reference type is correct */ | 1014 | /* Type mismatch -- attempt repair of the returned object */ |
1017 | 1015 | ||
1018 | if (return_object->common.type == ACPI_TYPE_LOCAL_REFERENCE) { | 1016 | status = acpi_ns_repair_object(data, expected_btypes, |
1019 | status = acpi_ns_check_reference(data, return_object); | 1017 | package_index, return_object_ptr); |
1018 | if (ACPI_SUCCESS(status)) { | ||
1019 | return (AE_OK); /* Repair was successful */ | ||
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | return (status); | ||
1023 | |||
1024 | type_error_exit: | 1022 | type_error_exit: |
1025 | 1023 | ||
1026 | /* Create a string with all expected types for this predefined object */ | 1024 | /* Create a string with all expected types for this predefined object */ |