diff options
-rw-r--r-- | crypto/testmgr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 93e508c39e3b..779a12dcb6a8 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -1460,11 +1460,11 @@ static int test_cprng(struct crypto_rng *tfm, struct cprng_testvec *template, for (j = 0; j < template[i].loops; j++) { err = crypto_rng_get_bytes(tfm, result, template[i].rlen); - if (err != template[i].rlen) { + if (err < 0) { printk(KERN_ERR "alg: cprng: Failed to obtain " "the correct amount of random data for " - "%s (requested %d, got %d)\n", algo, - template[i].rlen, err); + "%s (requested %d)\n", algo, + template[i].rlen); goto out; } } |