Skip to content

Commit

Permalink
crypto: ansi_cprng - Fix module initialization
Browse files Browse the repository at this point in the history
Return the value we got from crypto_register_alg() instead of
returning 0 in any case.

Signed-off-by: Steffen Klassert <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
klassert authored and herbertx committed Aug 29, 2009
1 parent 36f87a4 commit a367b17
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions crypto/ansi_cprng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a367b17

Please sign in to comment.