crypto: Use ERR_CAST
[linux-2.6.git] / crypto / authenc.c
index b9884ee..a5a22cf 100644 (file)
@@ -616,7 +616,7 @@ static struct crypto_instance *crypto_authenc_alloc(struct rtattr **tb)
        auth = ahash_attr_alg(tb[1], CRYPTO_ALG_TYPE_HASH,
                               CRYPTO_ALG_TYPE_AHASH_MASK);
        if (IS_ERR(auth))
-               return ERR_PTR(PTR_ERR(auth));
+               return ERR_CAST(auth);
 
        auth_base = &auth->base;