From: Tom Lendacky Date: Mon, 24 Feb 2014 14:42:08 +0000 (-0600) Subject: crypto: ccp - Invoke context callback when there is a backlog error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=950b10bae656d7edf5e2047bf0c9205980f49f2c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Herbert Xu --- 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) 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);