ソースを参照

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>
Tom Lendacky 11 年 前
コミット
950b10bae6
1 ファイル変更3 行追加0 行削除
  1. 3 0
      drivers/crypto/ccp/ccp-crypto-main.c

+ 3 - 0
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);