]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - crypto/ctr.c
powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit
[karo-tx-linux.git] / crypto / ctr.c
index 1f2997cbfdd480937f6ca0c86abd3e9d7e73d5b0..f2b94f27bb2cf9ac2b49ffa88d527f4f8ef98961 100644 (file)
@@ -343,17 +343,15 @@ static struct crypto_instance *crypto_rfc3686_alloc(struct rtattr **tb)
        int err;
 
        algt = crypto_get_attr_type(tb);
-       err = PTR_ERR(algt);
        if (IS_ERR(algt))
-               return ERR_PTR(err);
+               return ERR_CAST(algt);
 
        if ((algt->type ^ CRYPTO_ALG_TYPE_BLKCIPHER) & algt->mask)
                return ERR_PTR(-EINVAL);
 
        cipher_name = crypto_attr_alg_name(tb[1]);
-       err = PTR_ERR(cipher_name);
        if (IS_ERR(cipher_name))
-               return ERR_PTR(err);
+               return ERR_CAST(cipher_name);
 
        inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL);
        if (!inst)