diff options
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, | |||
164 | * Validate output buffer. | 164 | * Validate output buffer. |
165 | */ | 165 | */ |
166 | if (buffer->length == ACPI_ALLOCATE_BUFFER) { | 166 | if (buffer->length == ACPI_ALLOCATE_BUFFER) { |
167 | buffer->pointer = ACPI_ALLOCATE(size_required); | 167 | buffer->pointer = ACPI_ALLOCATE_ZEROED(size_required); |
168 | if (!buffer->pointer) | 168 | if (!buffer->pointer) |
169 | return AE_NO_MEMORY; | 169 | return AE_NO_MEMORY; |
170 | buffer->length = size_required; | 170 | buffer->length = size_required; |
171 | memset(buffer->pointer, 0, size_required); | ||
172 | } else { | 171 | } else { |
173 | if (buffer->length < size_required) { | 172 | if (buffer->length < size_required) { |
174 | buffer->length = size_required; | 173 | buffer->length = size_required; |