summaryrefslogtreecommitdiff
path: root/crypto/chainiv.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/chainiv.c')
-rw-r--r--crypto/chainiv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/chainiv.c b/crypto/chainiv.c
index ba200b07449d..834d8dd3d4fc 100644
--- a/crypto/chainiv.c
+++ b/crypto/chainiv.c
@@ -291,9 +291,8 @@ static struct crypto_instance *chainiv_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);
err = crypto_get_default_rng();
if (err)