summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/utobject.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2015-12-29 08:54:36 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-01 05:36:53 +0300
commit1fad87385e7e82f656fb661aef0f841e42991974 (patch)
tree55882b08ecf543cc508d489c4b08033f229dd82c /drivers/acpi/acpica/utobject.c
parentcd162b35a29900b7e7a595c5ea70066cd5d47aee (diff)
downloadlinux-1fad87385e7e82f656fb661aef0f841e42991974.tar.xz
ACPICA: Core: Major update for code formatting, no functional changes
ACPICA commit dfa394471f6c01b2ee9433dbc143ec70cb9bca72 Mostly indentation inconsistencies across the code. Split some long lines, etc. Link: https://github.com/acpica/acpica/commit/dfa39447 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utobject.c')
-rw-r--r--drivers/acpi/acpica/utobject.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index c7e11ccb09ba..787eccf6a1d5 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -112,9 +112,9 @@ union acpi_operand_object *acpi_ut_create_internal_object_dbg(const char
/* These types require a secondary object */
- second_object = acpi_ut_allocate_object_desc_dbg(module_name,
- line_number,
- component_id);
+ second_object =
+ acpi_ut_allocate_object_desc_dbg(module_name, line_number,
+ component_id);
if (!second_object) {
acpi_ut_delete_object_desc(object);
return_PTR(NULL);
@@ -254,6 +254,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size)
if (!buffer) {
ACPI_ERROR((AE_INFO, "Could not allocate size %u",
(u32)buffer_size));
+
acpi_ut_remove_reference(buffer_desc);
return_PTR(NULL);
}
@@ -306,6 +307,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)
if (!string) {
ACPI_ERROR((AE_INFO, "Could not allocate size %u",
(u32)string_size));
+
acpi_ut_remove_reference(string_desc);
return_PTR(NULL);
}
@@ -649,8 +651,9 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,
info.object_space = 0;
info.num_packages = 1;
- status = acpi_ut_walk_package_tree(internal_object, NULL,
- acpi_ut_get_element_length, &info);
+ status =
+ acpi_ut_walk_package_tree(internal_object, NULL,
+ acpi_ut_get_element_length, &info);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
@@ -660,7 +663,8 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,
* just add the length of the package objects themselves.
* Round up to the next machine word.
*/
- info.length += ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)) *
+ info.length +=
+ ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)) *
(acpi_size) info.num_packages;
/* Return the total package length */
@@ -692,8 +696,8 @@ acpi_ut_get_object_size(union acpi_operand_object *internal_object,
ACPI_FUNCTION_ENTRY();
if ((ACPI_GET_DESCRIPTOR_TYPE(internal_object) ==
- ACPI_DESC_TYPE_OPERAND)
- && (internal_object->common.type == ACPI_TYPE_PACKAGE)) {
+ ACPI_DESC_TYPE_OPERAND) &&
+ (internal_object->common.type == ACPI_TYPE_PACKAGE)) {
status =
acpi_ut_get_package_object_size(internal_object,
obj_length);