aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/crypto_user.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2011-10-21 08:37:10 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2011-10-21 08:37:10 -0400
commite6ea64ece7f4c14294b2fce5403b1e71eab87f1e (patch)
tree201a204bcd707608ae23ebe2ac90b4fe1b403f83 /crypto/crypto_user.c
parent573da6208a7e2b2d8666b8b02f5054d3a4e12998 (diff)
crypto: user - Initialise match in crypto_alg_match
We need to default match to 0 as otherwise it may lead to a false positive. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r--crypto/crypto_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 748990fa3c53..2abca780312d 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -40,7 +40,6 @@ struct crypto_dump_info {
40 40
41static struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact) 41static struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact)
42{ 42{
43 int match;
44 struct crypto_alg *q, *alg = NULL; 43 struct crypto_alg *q, *alg = NULL;
45 44
46 down_read(&crypto_alg_sem); 45 down_read(&crypto_alg_sem);
@@ -49,6 +48,7 @@ static struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact)
49 return NULL; 48 return NULL;
50 49
51 list_for_each_entry(q, &crypto_alg_list, cra_list) { 50 list_for_each_entry(q, &crypto_alg_list, cra_list) {
51 int match = 0;
52 52
53 if ((q->cra_flags ^ p->cru_type) & p->cru_mask) 53 if ((q->cra_flags ^ p->cru_type) & p->cru_mask)
54 continue; 54 continue;