diff options
Diffstat (limited to 'drivers/acpi/acpi_memhotplug.c')
-rw-r--r-- | drivers/acpi/acpi_memhotplug.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 9a62224cc278..80eacbe157e2 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -481,26 +481,23 @@ static acpi_status is_memory_device(acpi_handle handle) | |||
481 | { | 481 | { |
482 | char *hardware_id; | 482 | char *hardware_id; |
483 | acpi_status status; | 483 | acpi_status status; |
484 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
485 | struct acpi_device_info *info; | 484 | struct acpi_device_info *info; |
486 | 485 | ||
487 | 486 | status = acpi_get_object_info(handle, &info); | |
488 | status = acpi_get_object_info(handle, &buffer); | ||
489 | if (ACPI_FAILURE(status)) | 487 | if (ACPI_FAILURE(status)) |
490 | return status; | 488 | return status; |
491 | 489 | ||
492 | info = buffer.pointer; | ||
493 | if (!(info->valid & ACPI_VALID_HID)) { | 490 | if (!(info->valid & ACPI_VALID_HID)) { |
494 | kfree(buffer.pointer); | 491 | kfree(info); |
495 | return AE_ERROR; | 492 | return AE_ERROR; |
496 | } | 493 | } |
497 | 494 | ||
498 | hardware_id = info->hardware_id.value; | 495 | hardware_id = info->hardware_id.string; |
499 | if ((hardware_id == NULL) || | 496 | if ((hardware_id == NULL) || |
500 | (strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID))) | 497 | (strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID))) |
501 | status = AE_ERROR; | 498 | status = AE_ERROR; |
502 | 499 | ||
503 | kfree(buffer.pointer); | 500 | kfree(info); |
504 | return status; | 501 | return status; |
505 | } | 502 | } |
506 | 503 | ||