diff options
author | jhbird.choi@samsung.com <jhbird.choi@samsung.com> | 2014-03-20 16:35:56 +0900 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-04 16:23:33 +0200 |
commit | 2d0acb4af981e20eb626c6ea1925e95056220b2a (patch) | |
tree | d8dfa9464f7c03d02eaea362d0cd858e10882e97 /drivers/acpi/utils.c | |
parent | 70f6c087573eeb406252ff8d98f511eb5f71496e (diff) | |
download | linux-2d0acb4af981e20eb626c6ea1925e95056220b2a.tar.bz2 |
ACPI: Clean up memory allocations
Use acpi_os_allocate_zeroed instead of acpi_os_allocate + memset.
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
[rjw: Subject and changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r-- | drivers/acpi/utils.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 0f5f78fa6545..bba526148583 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -164,11 +164,10 @@ acpi_extract_package(union acpi_object *package, * Validate output buffer. */ if (buffer->length == ACPI_ALLOCATE_BUFFER) { - buffer->pointer = ACPI_ALLOCATE(size_required); + buffer->pointer = ACPI_ALLOCATE_ZEROED(size_required); if (!buffer->pointer) return AE_NO_MEMORY; buffer->length = size_required; - memset(buffer->pointer, 0, size_required); } else { if (buffer->length < size_required) { buffer->length = size_required; |