tpm/tpm_ppi: Check return value of acpi_get_name
authorPeter Huewe <PeterHuewe@gmx.de>
Wed, 30 Oct 2013 00:40:28 +0000 (01:40 +0100)
committerPeter Huewe <peterhuewe@gmx.de>
Mon, 6 Jan 2014 13:37:23 +0000 (14:37 +0100)
commit238b1eaa59e6a8e2993af0db9ec2255bfa53927b
treeb332688b47a875a7d3d82585db36f4540b7bc5b8
parent747d35bd9bb4ae6bd74b19baa5bbe32f3e0cee11
tpm/tpm_ppi: Check return value of acpi_get_name

If
 status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
fails for whatever reason and does not return AE_OK
 if (strstr(buffer.pointer, context) != NULL) {
does dereference a null pointer.

-> Check the return value and return the status to the caller

Found by coverity
Cc: stable@vger.kernel.org
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm_ppi.c