]> Pileus Git - ~andy/linux/blobdiff - crypto/authenc.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[~andy/linux] / crypto / authenc.c
index d0583a4489e60ee59a6cc0950d7342594a4d5780..ffce19de05cf958853dc0e13f7e3cf1efa30cd4f 100644 (file)
@@ -592,9 +592,8 @@ static struct crypto_instance *crypto_authenc_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_AEAD) & algt->mask)
                return ERR_PTR(-EINVAL);