@@ -45,8 +45,8 @@ static int ccp_aes_cmac_complete(struct crypto_async_request *async_req,
rctx->buf_count = 0;
}
- /* Update result area if supplied */
- if (req->result)
+ /* Update result area if final */
+ if (rctx->final)
memcpy(req->result, rctx->iv, digest_size);
e_free:
@@ -46,8 +46,8 @@ static int ccp_sha_complete(struct crypto_async_request *async_req, int ret)
rctx->buf_count = 0;
}
- /* Update result area if supplied */
- if (req->result)
+ /* Update result area if final. */
+ if (rctx->final)
memcpy(req->result, rctx->ctx, digest_size);
e_free: