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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:11 +0000 (09:29 -0700)
commitc2c40e1af2a2a78c04120567709344b1bf9f8111
treed6738357b0f4e1a7a5ac4c791ce3492464da3f7d
parentf7ea8a3bd52da9670d32fd9869657a8501edff23
tpm, tpm_crb: fail when TPM2 ACPI table contents look corrupted

commit b371616b8537d6450ebca0819defbf53452bebf3 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm_crb.c