aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2014-02-24 09:42:08 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2014-02-26 16:57:00 -0500
commit950b10bae656d7edf5e2047bf0c9205980f49f2c (patch)
treedfacda484d4c76885e129bec9254ed5da892515d /drivers/crypto
parent0611451b4e78ecb77b3323657f2ab4aadd6d28b3 (diff)
crypto: ccp - Invoke context callback when there is a backlog error
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>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/ccp/ccp-crypto-main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto-main.c b/drivers/crypto/ccp/ccp-crypto-main.c
index 9d30d6fbfd3d..7d98635c2c5e 100644
--- a/drivers/crypto/ccp/ccp-crypto-main.c
+++ b/drivers/crypto/ccp/ccp-crypto-main.c
@@ -183,6 +183,9 @@ static void ccp_crypto_complete(void *data, int err)
183 break; 183 break;
184 184
185 /* Error occurred, report it and get the next entry */ 185 /* Error occurred, report it and get the next entry */
186 ctx = crypto_tfm_ctx(held->req->tfm);
187 if (ctx->complete)
188 ret = ctx->complete(held->req, ret);
186 held->req->complete(held->req, ret); 189 held->req->complete(held->req, ret);
187 190
188 next = ccp_crypto_cmd_complete(held, &backlog); 191 next = ccp_crypto_cmd_complete(held, &backlog);