tpm, tpm_crb: fail when TPM2 ACPI table contents look corrupted
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 24 Jun 2015 14:14:55 +0000 (17:14 +0300)
committerPeter Huewe <peterhuewe@gmx.de>
Mon, 13 Jul 2015 21:34:12 +0000 (23:34 +0200)
commitb371616b8537d6450ebca0819defbf53452bebf3
treebd428e4d43248d258ba4a075d19ae39967e2a0b2
parentba0ef85479c46a2ab354c2220bdb6152f7f4baf3
tpm, tpm_crb: fail when TPM2 ACPI table contents look corrupted

At least some versions of AMI BIOS have corrupted contents in the TPM2
ACPI table and namely the physical address of the control area is set to
zero.

This patch changes the driver to fail gracefully  when we observe a zero
address instead of continuing to ioremap.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm_crb.c