aboutsummaryrefslogtreecommitdiff
path: root/crypto/aead.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/aead.c')
-rw-r--r--crypto/aead.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/aead.c b/crypto/aead.c
index 0b8121ebec0..4d04e12ffde 100644
--- a/crypto/aead.c
+++ b/crypto/aead.c
@@ -282,18 +282,16 @@ struct crypto_instance *aead_geniv_alloc(struct crypto_template *tmpl,
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 | CRYPTO_ALG_GENIV)) &
algt->mask)
return ERR_PTR(-EINVAL);
name = crypto_attr_alg_name(tb[1]);
- err = PTR_ERR(name);
if (IS_ERR(name))
- return ERR_PTR(err);
+ return ERR_CAST(name);
inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL);
if (!inst)