summaryrefslogtreecommitdiff
path: root/crypto/ctr.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ctr.c')
-rw-r--r--crypto/ctr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/ctr.c b/crypto/ctr.c
index 4ca7222cfeb6..095dcb66d72d 100644
--- a/crypto/ctr.c
+++ b/crypto/ctr.c
@@ -334,9 +334,8 @@ static struct crypto_instance *crypto_rfc3686_alloc(struct rtattr **tb)
alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_BLKCIPHER,
CRYPTO_ALG_TYPE_MASK);
- err = PTR_ERR(alg);
if (IS_ERR(alg))
- return ERR_PTR(err);
+ return ERR_CAST(alg);
/* We only support 16-byte blocks. */
err = -EINVAL;