Calling the lower-level function does what's needed with less overhead.

Signed-off-by: George Spelvin <li...@horizon.com>
---
 crypto/ansi_cprng.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
index f6a1e987..249b944f 100644
--- a/crypto/ansi_cprng.c
+++ b/crypto/ansi_cprng.c
@@ -329,7 +329,6 @@ static int fips_cprng_get_random(struct crypto_rng *tfm, u8 
*rdata,
 
 static int fips_cprng_reset(struct crypto_rng *tfm, u8 *seed, unsigned int 
slen)
 {
-       u8 rdata[DEFAULT_BLK_SZ];
        u8 *key = seed + DEFAULT_BLK_SZ;
        int rc;
 
@@ -348,7 +347,7 @@ static int fips_cprng_reset(struct crypto_rng *tfm, u8 
*seed, unsigned int slen)
                goto out;
 
        /* this primes our continuity test */
-       rc = get_prng_bytes(rdata, DEFAULT_BLK_SZ, prng, false);
+       rc = _get_more_prng_bytes(prng, false);
        prng->rand_data_valid = DEFAULT_BLK_SZ;
 
 out:
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to