tpm_tis_spi: Check correct byte for wait state indicator
authorPeter Huewe <peter.huewe@infineon.com>
Thu, 2 Mar 2017 13:03:13 +0000 (13:03 +0000)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 3 Apr 2017 19:46:01 +0000 (22:46 +0300)
commite110cc69dc2ad679d6d478df636b99b14e6fbbc9
tree55029043595c6bec5e6e50cf90f91a9b4ad81d6c
parent975094ddc369a32f27210248bdd9bbd153061b00
tpm_tis_spi: Check correct byte for wait state indicator

Wait states are signaled in the last byte received from the TPM in
response to the header, not the first byte. Check rx_buf[3] instead of
rx_buf[0].

Cc: <stable@vger.kernel.org>
Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy")
Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Benoit Houyere <benoit.houyere@st.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_tis_spi.c