crypto: crc32 - add crc32 pclmulqdq implementation and wrappers for table implementation
[linux-3.10.git] / crypto / ctr.c
index 2d7425f..4ca7222 100644 (file)
@@ -185,7 +185,7 @@ static struct crypto_instance *crypto_ctr_alloc(struct rtattr **tb)
        alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER,
                                  CRYPTO_ALG_TYPE_MASK);
        if (IS_ERR(alg))
-               return ERR_PTR(PTR_ERR(alg));
+               return ERR_CAST(alg);
 
        /* Block size must be >= 4 bytes. */
        err = -EINVAL;
@@ -219,6 +219,8 @@ static struct crypto_instance *crypto_ctr_alloc(struct rtattr **tb)
        inst->alg.cra_blkcipher.encrypt = crypto_ctr_crypt;
        inst->alg.cra_blkcipher.decrypt = crypto_ctr_crypt;
 
+       inst->alg.cra_blkcipher.geniv = "chainiv";
+
 out:
        crypto_mod_put(alg);
        return inst;