]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
crypto: ccp - Invoke context callback when there is a backlog error
authorTom Lendacky <thomas.lendacky@amd.com>
Mon, 24 Feb 2014 14:42:08 +0000 (08:42 -0600)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 26 Feb 2014 21:57:00 +0000 (05:57 +0800)
Invoke the callback routine associated with the crypto context
if an error is encountered sending the command to the CCP during
backlog processing.  This is needed to free any resources used
by the command.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-crypto-main.c

index 9d30d6fbfd3d3b2708f3469a2f0d73ef6fb491ad..7d98635c2c5e26d9b6196a82e4b88c36d17342f5 100644 (file)
@@ -183,6 +183,9 @@ static void ccp_crypto_complete(void *data, int err)
                        break;
 
                /* Error occurred, report it and get the next entry */
+               ctx = crypto_tfm_ctx(held->req->tfm);
+               if (ctx->complete)
+                       ret = ctx->complete(held->req, ret);
                held->req->complete(held->req, ret);
 
                next = ccp_crypto_cmd_complete(held, &backlog);