crypto: caam/qi2 - fix return code in ahash_finup_no_ctx()
authorHoria Geantă <horia.geanta@nxp.com>
Fri, 19 Jun 2020 13:22:53 +0000 (16:22 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jun 2020 04:46:43 +0000 (14:46 +1000)
commitd095146cae11b89a1e4e531a9ff87731d0f5eadd
treeecb59c2989bbb192fb317aa24cc9291e8096fbce
parent84d840e1dd90e5fc07dedbd16df0dae7b3b3ef1a
crypto: caam/qi2 - fix return code in ahash_finup_no_ctx()

ahash_finup_no_ctx() returns -ENOMEM in most error cases,
and this is fine for almost all of them.

However, the return code provided by dpaa2_caam_enqueue()
(e.g. -EIO or -EBUSY) shouldn't be overridden by -ENOMEM.

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