diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-02 23:08:15 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-05-02 23:08:15 -0400 |
commit | c614e109c184edd7900d9ff4d6de9ef94bc4d85b (patch) | |
tree | c530116b73f23feddb795142f36042e2f33ee781 | |
parent | 99700716a9b2e117fd50c6d3f1fd5edeef6dc6d2 (diff) |
crypto: algapi - Remove unneeded null check
We don't check "frontend" consistently in crypto_init_spawn2(). We
check it at the start of the function but then we dereference it
unconditionally in the parameter list when we call crypto_init_spawn().
I looked at the places that call crypto_init_spawn2() and "frontend" is
always a valid pointer so I removed the check for null.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/algapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 3e4524e6139b..d49d7091cecf 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -543,7 +543,7 @@ int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg, | |||
543 | { | 543 | { |
544 | int err = -EINVAL; | 544 | int err = -EINVAL; |
545 | 545 | ||
546 | if (frontend && (alg->cra_flags ^ frontend->type) & frontend->maskset) | 546 | if ((alg->cra_flags ^ frontend->type) & frontend->maskset) |
547 | goto out; | 547 | goto out; |
548 | 548 | ||
549 | spawn->frontend = frontend; | 549 | spawn->frontend = frontend; |