* [PATCH] crypto: ansi_cprng - Fix module initialization
@ 2009-08-25 8:14 Steffen Klassert
2009-08-25 10:59 ` Neil Horman
0 siblings, 1 reply; 3+ messages in thread
From: Steffen Klassert @ 2009-08-25 8:14 UTC (permalink / raw)
To: Herbert Xu, Neil Horman; +Cc: linux-crypto
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>
---
crypto/ansi_cprng.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
index 5357ba7..3aa6e38 100644
--- a/crypto/ansi_cprng.c
+++ b/crypto/ansi_cprng.c
@@ -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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: ansi_cprng - Fix module initialization
2009-08-25 8:14 [PATCH] crypto: ansi_cprng - Fix module initialization Steffen Klassert
@ 2009-08-25 10:59 ` Neil Horman
2009-08-29 7:36 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Neil Horman @ 2009-08-25 10:59 UTC (permalink / raw)
To: Steffen Klassert; +Cc: Herbert Xu, linux-crypto
On Tue, Aug 25, 2009 at 10:14:16AM +0200, Steffen Klassert wrote:
> 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>
> ---
> crypto/ansi_cprng.c | 9 +--------
> 1 files changed, 1 insertions(+), 8 deletions(-)
>
> diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
> index 5357ba7..3aa6e38 100644
> --- a/crypto/ansi_cprng.c
> +++ b/crypto/ansi_cprng.c
> @@ -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)
> --
> 1.5.4.2
>
>
Thanks!
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: ansi_cprng - Fix module initialization
2009-08-25 10:59 ` Neil Horman
@ 2009-08-29 7:36 ` Herbert Xu
0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2009-08-29 7:36 UTC (permalink / raw)
To: Neil Horman; +Cc: Steffen Klassert, linux-crypto
On Tue, Aug 25, 2009 at 06:59:00AM -0400, Neil Horman wrote:
> On Tue, Aug 25, 2009 at 10:14:16AM +0200, Steffen Klassert wrote:
> > 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>
Patch applied. Thanks a lot!
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-29 7:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 8:14 [PATCH] crypto: ansi_cprng - Fix module initialization Steffen Klassert
2009-08-25 10:59 ` Neil Horman
2009-08-29 7:36 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox