tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown()
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 25 Apr 2016 09:20:07 +0000 (12:20 +0300)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sat, 25 Jun 2016 14:26:35 +0000 (17:26 +0300)
commitc0dff1f4519e3b3c322415b822724d4207156859
tree3f2f2897be4dce9f1c5c11191dc2e4f93e5cab3c
parent422eac3f7deae34dbaffd08e03e27f37a5394a56
tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown()

Fixes: 20e0152393b41 ("tpm: fix crash in tpm_tis deinitialization")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reported-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
drivers/char/tpm/tpm-chip.c