diff options
author | David S. Miller <davem@davemloft.net> | 2014-01-14 23:37:09 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-14 23:42:42 +0100 |
commit | 0a379e21c503b2ff66b44d588df9f231e9b0b9ca (patch) | |
tree | 22b875fcf4b67fcd007726f00c5fc1748ce985d0 /drivers/char/tpm/tpm_ppi.c | |
parent | Merge branch 'skb_checksum_help' (diff) | |
parent | net: usbnet: fix SG initialisation (diff) | |
download | linux-0a379e21c503b2ff66b44d588df9f231e9b0b9ca.tar.xz linux-0a379e21c503b2ff66b44d588df9f231e9b0b9ca.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/char/tpm/tpm_ppi.c')
-rw-r--r-- | drivers/char/tpm/tpm_ppi.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c index 8e562dc65601..e1f3337a0cf9 100644 --- a/drivers/char/tpm/tpm_ppi.c +++ b/drivers/char/tpm/tpm_ppi.c @@ -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], |