summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/crypto/aes-spe-glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/crypto/aes-spe-glue.c')
-rw-r--r--arch/powerpc/crypto/aes-spe-glue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/crypto/aes-spe-glue.c b/arch/powerpc/crypto/aes-spe-glue.c
index 93ee046d12cd..160807977abe 100644
--- a/arch/powerpc/crypto/aes-spe-glue.c
+++ b/arch/powerpc/crypto/aes-spe-glue.c
@@ -126,6 +126,11 @@ static int ppc_xts_setkey(struct crypto_tfm *tfm, const u8 *in_key,
unsigned int key_len)
{
struct ppc_xts_ctx *ctx = crypto_tfm_ctx(tfm);
+ int err;
+
+ err = xts_check_key(tfm, in_key, key_len);
+ if (err)
+ return err;
key_len >>= 1;