Skip to content

Commit

Permalink
Merge branches 'acpi-ac' and 'acpi-tpm'
Browse files Browse the repository at this point in the history
* acpi-ac:
  ACPI / AC: change notification handler type to ACPI_ALL_NOTIFY

* acpi-tpm:
  ACPI / TPM: fix memory leak when walking ACPI namespace
  • Loading branch information
Rafael J. Wysocki committed Jan 5, 2014
2 parents 50a2bc5 + df45c71 commit c8d1507
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions drivers/char/tpm/tpm_ppi.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ static char *tpm_device_name = "TPM";
static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context,
void **return_value)
{
acpi_status status;
acpi_status status = AE_OK;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
if (strstr(buffer.pointer, context) != NULL) {
*return_value = handle;

if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer))) {
if (strstr(buffer.pointer, context) != NULL) {
*return_value = handle;
status = AE_CTRL_TERMINATE;
}
kfree(buffer.pointer);
return AE_CTRL_TERMINATE;
}
return AE_OK;

return status;
}

static inline void ppi_assign_params(union acpi_object params[4],
Expand Down

0 comments on commit c8d1507

Please sign in to comment.