summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nspredef.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2010-01-21 09:08:31 +0800
committerLen Brown <len.brown@intel.com>2010-01-22 12:30:02 -0500
commit2147d3f00f85c9e993786863d8138694672da01b (patch)
tree446fe7d97ded336fbc5c8d8cad9ad87b959a6588 /drivers/acpi/acpica/nspredef.c
parent92dcffb916d309aa01778bf8963a6932e4014d07 (diff)
ACPICA: Update for new gcc-4 warning options
Added several new options for the gcc-4 generation, and updated the source accordingly. This includes some code restructuring to eliminate unreachable code, elimination of some gotos, elimination of unused return values, and some additional casting. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nspredef.c')
-rw-r--r--drivers/acpi/acpica/nspredef.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index d34fa59548f..309586f5809 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,
/* Is the object one of the expected types? */
- if (!(return_btype & expected_btypes)) {
+ if (return_btype & expected_btypes) {
- /* Type mismatch -- attempt repair of the returned object */
+ /* For reference objects, check that the reference type is correct */
- status = acpi_ns_repair_object(data, expected_btypes,
- package_index,
- return_object_ptr);
- if (ACPI_SUCCESS(status)) {
- return (AE_OK); /* Repair was successful */
+ if (return_object->common.type == ACPI_TYPE_LOCAL_REFERENCE) {
+ status = acpi_ns_check_reference(data, return_object);
}
- goto type_error_exit;
+
+ return (status);
}
- /* For reference objects, check that the reference type is correct */
+ /* Type mismatch -- attempt repair of the returned object */
- if (return_object->common.type == ACPI_TYPE_LOCAL_REFERENCE) {
- status = acpi_ns_check_reference(data, return_object);
+ status = acpi_ns_repair_object(data, expected_btypes,
+ package_index, return_object_ptr);
+ if (ACPI_SUCCESS(status)) {
+ return (AE_OK); /* Repair was successful */
}
- return (status);
-
type_error_exit:
/* Create a string with all expected types for this predefined object */