Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-block.git] / arch / arm64 / crypto / aes-neonbs-glue.c
index bf1b321ff4c1ffb4c0692c235821708f5e28be6e..02b65d9eb9479599c7f06f50c6c25837dc4bd2ed 100644 (file)
@@ -288,7 +288,7 @@ static int ctr_encrypt_sync(struct skcipher_request *req)
        struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
        struct aesbs_ctr_ctx *ctx = crypto_skcipher_ctx(tfm);
 
-       if (!may_use_simd())
+       if (!crypto_simd_usable())
                return aes_ctr_encrypt_fallback(&ctx->fallback, req);
 
        return ctr_encrypt(req);
@@ -304,6 +304,8 @@ static int __xts_crypt(struct skcipher_request *req,
        int err;
 
        err = skcipher_walk_virt(&walk, req, false);
+       if (err)
+               return err;
 
        kernel_neon_begin();
        neon_aes_ecb_encrypt(walk.iv, walk.iv, ctx->twkey, ctx->key.rounds, 1);