diff options
| author | David Vrabel <david.vrabel@csr.com> | 2008-12-08 16:18:47 +0000 |
|---|---|---|
| committer | David Vrabel <david.vrabel@csr.com> | 2008-12-08 16:18:47 +0000 |
| commit | c35fa3ea1ae8198bd65c2c6e59d9ebd68c115a59 (patch) | |
| tree | 878768b69df25459b448aa890352342c4a3c6e2d /drivers/acpi/utils.c | |
| parent | dcc7461eef7341e84e2f7274f904ce01a43b2506 (diff) | |
| parent | 218d11a8b071b23b76c484fd5f72a4fe3306801e (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Diffstat (limited to 'drivers/acpi/utils.c')
| -rw-r--r-- | drivers/acpi/utils.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index e827be36ee8..f844941089b 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -259,34 +259,26 @@ acpi_evaluate_integer(acpi_handle handle, struct acpi_object_list *arguments, unsigned long long *data) { acpi_status status = AE_OK; - union acpi_object *element; + union acpi_object element; struct acpi_buffer buffer = { 0, NULL }; - if (!data) return AE_BAD_PARAMETER; - element = kzalloc(sizeof(union acpi_object), irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL); - if (!element) - return AE_NO_MEMORY; - buffer.length = sizeof(union acpi_object); - buffer.pointer = element; + buffer.pointer = &element; status = acpi_evaluate_object(handle, pathname, arguments, &buffer); if (ACPI_FAILURE(status)) { acpi_util_eval_error(handle, pathname, status); - kfree(element); return status; } - if (element->type != ACPI_TYPE_INTEGER) { + if (element.type != ACPI_TYPE_INTEGER) { acpi_util_eval_error(handle, pathname, AE_BAD_DATA); - kfree(element); return AE_BAD_DATA; } - *data = element->integer.value; - kfree(element); + *data = element.integer.value; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%llu]\n", *data)); |
