summaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-04-22 11:02:27 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2015-04-23 14:18:05 +0800
commit43a9607d86e8fb110b596d300dbaae895c198fed (patch)
tree3cc4ab7889040e4a36be2f389200cc2b5d8bf277 /crypto/tcrypt.c
parentb617b702da4e922277806f81c411d3051107d462 (diff)
downloadlinux-43a9607d86e8fb110b596d300dbaae895c198fed.tar.bz2
crypto: tcrypt - Handle async return from crypto_ahash_init
The function crypto_ahash_init can also be asynchronous just like update and final. So all callers must be able to handle an async return. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r--crypto/tcrypt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 1a2800107fc8..bf41c34da720 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -808,7 +808,7 @@ static int test_ahash_jiffies(struct ahash_request *req, int blen,
for (start = jiffies, end = start + secs * HZ, bcount = 0;
time_before(jiffies, end); bcount++) {
- ret = crypto_ahash_init(req);
+ ret = do_one_ahash_op(req, crypto_ahash_init(req));
if (ret)
return ret;
for (pcount = 0; pcount < blen; pcount += plen) {
@@ -877,7 +877,7 @@ static int test_ahash_cycles(struct ahash_request *req, int blen,
/* Warm-up run. */
for (i = 0; i < 4; i++) {
- ret = crypto_ahash_init(req);
+ ret = do_one_ahash_op(req, crypto_ahash_init(req));
if (ret)
goto out;
for (pcount = 0; pcount < blen; pcount += plen) {
@@ -896,7 +896,7 @@ static int test_ahash_cycles(struct ahash_request *req, int blen,
start = get_cycles();
- ret = crypto_ahash_init(req);
+ ret = do_one_ahash_op(req, crypto_ahash_init(req));
if (ret)
goto out;
for (pcount = 0; pcount < blen; pcount += plen) {