X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=crypto%2Fcast6.c;h=136ab6dfe8c5661a2f0c6190267cdf2459d37b0e;hb=d7a76e4cb3b4469b1eccb6204c053e3ebcd4c196;hp=08e33bfc3ad1098233599e5c65d011c7becc3407;hpb=f28e71617ddaf2483e3e5c5237103484a303743f;p=powerpc.git diff --git a/crypto/cast6.c b/crypto/cast6.c index 08e33bfc3a..136ab6dfe8 100644 --- a/crypto/cast6.c +++ b/crypto/cast6.c @@ -382,14 +382,15 @@ static inline void W(u32 *key, unsigned int i) { } static int cast6_setkey(struct crypto_tfm *tfm, const u8 *in_key, - unsigned key_len, u32 *flags) + unsigned key_len) { int i; u32 key[8]; __be32 p_key[8]; /* padded key */ struct cast6_ctx *c = crypto_tfm_ctx(tfm); + u32 *flags = &tfm->crt_flags; - if (key_len < 16 || key_len > 32 || key_len % 4 != 0) { + if (key_len % 4 != 0) { *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; return -EINVAL; }