crypto: ccree - account for TEE not ready to report
authorGilad Ben-Yossef <gilad@benyossef.com>
Tue, 2 Jul 2019 11:39:19 +0000 (14:39 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jul 2019 04:51:55 +0000 (14:51 +1000)
commit76a95bd8f9e10cade9c4c8df93b5c20ff45dc0f5
treec1fdcfbaf2381eb10f311c8412b27b9444986ee7
parente6e6600c001c3aa3760aeb83dbd4630063e926ee
crypto: ccree - account for TEE not ready to report

When ccree driver runs it checks the state of the Trusted Execution
Environment CryptoCell driver before proceeding. We did not account
for cases where the TEE side is not ready or not available at all.
Fix it by only considering TEE error state after sync with the TEE
side driver.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Fixes: ab8ec9658f5a ("crypto: ccree - add FIPS support")
CC: stable@vger.kernel.org # v4.17+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_fips.c