Skip to content

Commit

Permalink
crypto: tcrypt - Do not bail on EINPROGRESS in multibuffer hash test
Browse files Browse the repository at this point in the history
The multibuffer hash speed test is incorrectly bailing because
of an EINPROGRESS return value.  This patch fixes it by setting
ret to zero if it is equal to -EINPROGRESS.

Reported-by: Megha Dey <megha.dey@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Herbert Xu committed Jul 1, 2016
1 parent d858b07 commit d13cd11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,10 @@ static void test_mb_ahash_speed(const char *algo, unsigned int sec,

for (k = 0; k < 8; k++) {
ret = crypto_ahash_digest(data[k].req);
if (ret == -EINPROGRESS)
if (ret == -EINPROGRESS) {
ret = 0;
continue;
}

if (ret)
break;
Expand Down

0 comments on commit d13cd11

Please sign in to comment.