aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-04-21 23:02:27 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-04-23 02:18:05 -0400
commit43a9607d86e8fb110b596d300dbaae895c198fed (patch)
tree3cc4ab7889040e4a36be2f389200cc2b5d8bf277
parentb617b702da4e922277806f81c411d3051107d462 (diff)
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>
-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,
808 808
809 for (start = jiffies, end = start + secs * HZ, bcount = 0; 809 for (start = jiffies, end = start + secs * HZ, bcount = 0;
810 time_before(jiffies, end); bcount++) { 810 time_before(jiffies, end); bcount++) {
811 ret = crypto_ahash_init(req); 811 ret = do_one_ahash_op(req, crypto_ahash_init(req));
812 if (ret) 812 if (ret)
813 return ret; 813 return ret;
814 for (pcount = 0; pcount < blen; pcount += plen) { 814 for (pcount = 0; pcount < blen; pcount += plen) {
@@ -877,7 +877,7 @@ static int test_ahash_cycles(struct ahash_request *req, int blen,
877 877
878 /* Warm-up run. */ 878 /* Warm-up run. */
879 for (i = 0; i < 4; i++) { 879 for (i = 0; i < 4; i++) {
880 ret = crypto_ahash_init(req); 880 ret = do_one_ahash_op(req, crypto_ahash_init(req));
881 if (ret) 881 if (ret)
882 goto out; 882 goto out;
883 for (pcount = 0; pcount < blen; pcount += plen) { 883 for (pcount = 0; pcount < blen; pcount += plen) {
@@ -896,7 +896,7 @@ static int test_ahash_cycles(struct ahash_request *req, int blen,
896 896
897 start = get_cycles(); 897 start = get_cycles();
898 898
899 ret = crypto_ahash_init(req); 899 ret = do_one_ahash_op(req, crypto_ahash_init(req));
900 if (ret) 900 if (ret)
901 goto out; 901 goto out;
902 for (pcount = 0; pcount < blen; pcount += plen) { 902 for (pcount = 0; pcount < blen; pcount += plen) {