crypto: caam - update IV only when crypto operation succeeds
authorHoria Geantă <horia.geanta@nxp.com>
Wed, 31 Jul 2019 13:08:04 +0000 (16:08 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Aug 2019 05:11:45 +0000 (15:11 +1000)
commit1ccb39eb5a9822543273c35f5114a9dc101e7315
tree4e10355aaadf59e04a606fd32e255cc91bd8d907
parent1984aaeec372fbfb597883074253d290cbd543d4
crypto: caam - update IV only when crypto operation succeeds

skcipher encryption might fail and in some cases, like (invalid) input
length smaller then block size, updating the IV would lead to a useless
IV copy in case hardware issued an error.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/caamalg_qi2.c