]> git.karo-electronics.de Git - linux-beck.git/commit
crypto: caam - fix error reporting
authorCristian Stoica <cristian.stoica@freescale.com>
Wed, 5 Nov 2014 09:21:24 +0000 (11:21 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Nov 2014 15:15:05 +0000 (23:15 +0800)
commit49783d0f54219e1c68eac738fdd3244b7a6cbda7
tree4b64bc6e585dce05e5f9ad15284f6b60b0d4d7dd
parent7222d1a3410388c8e21a5028ba2beb498938b57f
crypto: caam - fix error reporting

The error code returned by hardware is four bits wide with an expected
zero MSB. A hardware error condition where the error code can get between
0x8 and 0xf will trigger an out of bound array access on the error
message table.
This patch fixes the invalid array access following such an error and
reports the condition.

Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/error.c