diff options
Diffstat (limited to 'drivers/acpi/acpica/exconfig.c')
-rw-r--r-- | drivers/acpi/acpica/exconfig.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c index 24afef81af39..7e8b3bedc376 100644 --- a/drivers/acpi/acpica/exconfig.c +++ b/drivers/acpi/acpica/exconfig.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2008, Intel Corp. | 8 | * Copyright (C) 2000 - 2010, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -170,14 +170,12 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, | |||
170 | 170 | ||
171 | /* Table not found, return an Integer=0 and AE_OK */ | 171 | /* Table not found, return an Integer=0 and AE_OK */ |
172 | 172 | ||
173 | ddb_handle = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); | 173 | ddb_handle = acpi_ut_create_integer_object((u64) 0); |
174 | if (!ddb_handle) { | 174 | if (!ddb_handle) { |
175 | return_ACPI_STATUS(AE_NO_MEMORY); | 175 | return_ACPI_STATUS(AE_NO_MEMORY); |
176 | } | 176 | } |
177 | 177 | ||
178 | ddb_handle->integer.value = 0; | ||
179 | *return_desc = ddb_handle; | 178 | *return_desc = ddb_handle; |
180 | |||
181 | return_ACPI_STATUS(AE_OK); | 179 | return_ACPI_STATUS(AE_OK); |
182 | } | 180 | } |
183 | 181 | ||
@@ -286,7 +284,7 @@ static acpi_status | |||
286 | acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) | 284 | acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) |
287 | { | 285 | { |
288 | acpi_status status; | 286 | acpi_status status; |
289 | acpi_integer value; | 287 | u64 value; |
290 | u32 region_offset = 0; | 288 | u32 region_offset = 0; |
291 | u32 i; | 289 | u32 i; |
292 | 290 | ||
@@ -492,7 +490,11 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
492 | 490 | ||
493 | status = acpi_tb_add_table(&table_desc, &table_index); | 491 | status = acpi_tb_add_table(&table_desc, &table_index); |
494 | if (ACPI_FAILURE(status)) { | 492 | if (ACPI_FAILURE(status)) { |
495 | goto cleanup; | 493 | |
494 | /* Delete allocated table buffer */ | ||
495 | |||
496 | acpi_tb_delete_table(&table_desc); | ||
497 | return_ACPI_STATUS(status); | ||
496 | } | 498 | } |
497 | 499 | ||
498 | /* | 500 | /* |
@@ -535,13 +537,6 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
535 | acpi_gbl_table_handler_context); | 537 | acpi_gbl_table_handler_context); |
536 | } | 538 | } |
537 | 539 | ||
538 | cleanup: | ||
539 | if (ACPI_FAILURE(status)) { | ||
540 | |||
541 | /* Delete allocated table buffer */ | ||
542 | |||
543 | acpi_tb_delete_table(&table_desc); | ||
544 | } | ||
545 | return_ACPI_STATUS(status); | 540 | return_ACPI_STATUS(status); |
546 | } | 541 | } |
547 | 542 | ||