diff options
Diffstat (limited to 'drivers/acpi/container.c')
-rw-r--r-- | drivers/acpi/container.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index fe0cdf83641a..2aee8c24dc56 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -200,20 +200,17 @@ container_walk_namespace_cb(acpi_handle handle, | |||
200 | u32 lvl, void *context, void **rv) | 200 | u32 lvl, void *context, void **rv) |
201 | { | 201 | { |
202 | char *hid = NULL; | 202 | char *hid = NULL; |
203 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
204 | struct acpi_device_info *info; | 203 | struct acpi_device_info *info; |
205 | acpi_status status; | 204 | acpi_status status; |
206 | int *action = context; | 205 | int *action = context; |
207 | 206 | ||
208 | 207 | status = acpi_get_object_info(handle, &info); | |
209 | status = acpi_get_object_info(handle, &buffer); | 208 | if (ACPI_FAILURE(status)) { |
210 | if (ACPI_FAILURE(status) || !buffer.pointer) { | ||
211 | return AE_OK; | 209 | return AE_OK; |
212 | } | 210 | } |
213 | 211 | ||
214 | info = buffer.pointer; | ||
215 | if (info->valid & ACPI_VALID_HID) | 212 | if (info->valid & ACPI_VALID_HID) |
216 | hid = info->hardware_id.value; | 213 | hid = info->hardware_id.string; |
217 | 214 | ||
218 | if (hid == NULL) { | 215 | if (hid == NULL) { |
219 | goto end; | 216 | goto end; |
@@ -240,7 +237,7 @@ container_walk_namespace_cb(acpi_handle handle, | |||
240 | } | 237 | } |
241 | 238 | ||
242 | end: | 239 | end: |
243 | kfree(buffer.pointer); | 240 | kfree(info); |
244 | 241 | ||
245 | return AE_OK; | 242 | return AE_OK; |
246 | } | 243 | } |