From b852f1511f242ea55291d53f474b695dc70cf6e1 Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Fri, 15 Jul 2011 11:21:40 +0800 Subject: [PATCH] --- yaml --- r: 257941 b: refs/heads/master c: 1c2b4abb19285368808f303ad61e17b172f1a108 h: refs/heads/master i: 257939: f992ebdd45c31cfad1991c9c16cc799a81011e84 v: v3 --- [refs] | 2 +- trunk/drivers/crypto/talitos.c | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 48ddf63adad1..679b59f9c443 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: febec54286623a540cbe483a5d471ff6576a6e2e +refs/heads/master: 1c2b4abb19285368808f303ad61e17b172f1a108 diff --git a/trunk/drivers/crypto/talitos.c b/trunk/drivers/crypto/talitos.c index 521244e08fb1..8a0bb417aa11 100644 --- a/trunk/drivers/crypto/talitos.c +++ b/trunk/drivers/crypto/talitos.c @@ -1378,22 +1378,11 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int keylen) { struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher); - struct ablkcipher_alg *alg = crypto_ablkcipher_alg(cipher); - - if (keylen > TALITOS_MAX_KEY_SIZE) - goto badkey; - - if (keylen < alg->min_keysize || keylen > alg->max_keysize) - goto badkey; memcpy(&ctx->key, key, keylen); ctx->keylen = keylen; return 0; - -badkey: - crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); - return -EINVAL; } static void common_nonsnoop_unmap(struct device *dev,