dect
/
linux-2.6
Archived
13
0
Fork 0

crypto: ansi_cprng - Fix module initialization

Return the value we got from crypto_register_alg() instead of
returning 0 in any case.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Steffen Klassert 2009-08-29 17:36:25 +10:00 committed by Herbert Xu
parent 36f87a4a29
commit a367b17f34
1 changed files with 1 additions and 8 deletions

View File

@ -408,17 +408,10 @@ static struct crypto_alg rng_alg = {
/* Module initalization */
static int __init prng_mod_init(void)
{
int ret = 0;
if (fips_enabled)
rng_alg.cra_priority += 200;
ret = crypto_register_alg(&rng_alg);
if (ret)
goto out;
out:
return 0;
return crypto_register_alg(&rng_alg);
}
static void __exit prng_mod_fini(void)