diff options
Diffstat (limited to 'crypto/ctr.c')
-rw-r--r-- | crypto/ctr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/ctr.c b/crypto/ctr.c index 1f2997cbfdd4..f2b94f27bb2c 100644 --- a/crypto/ctr.c +++ b/crypto/ctr.c | |||
@@ -343,17 +343,15 @@ static struct crypto_instance *crypto_rfc3686_alloc(struct rtattr **tb) | |||
343 | int err; | 343 | int err; |
344 | 344 | ||
345 | algt = crypto_get_attr_type(tb); | 345 | algt = crypto_get_attr_type(tb); |
346 | err = PTR_ERR(algt); | ||
347 | if (IS_ERR(algt)) | 346 | if (IS_ERR(algt)) |
348 | return ERR_PTR(err); | 347 | return ERR_CAST(algt); |
349 | 348 | ||
350 | if ((algt->type ^ CRYPTO_ALG_TYPE_BLKCIPHER) & algt->mask) | 349 | if ((algt->type ^ CRYPTO_ALG_TYPE_BLKCIPHER) & algt->mask) |
351 | return ERR_PTR(-EINVAL); | 350 | return ERR_PTR(-EINVAL); |
352 | 351 | ||
353 | cipher_name = crypto_attr_alg_name(tb[1]); | 352 | cipher_name = crypto_attr_alg_name(tb[1]); |
354 | err = PTR_ERR(cipher_name); | ||
355 | if (IS_ERR(cipher_name)) | 353 | if (IS_ERR(cipher_name)) |
356 | return ERR_PTR(err); | 354 | return ERR_CAST(cipher_name); |
357 | 355 | ||
358 | inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL); | 356 | inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL); |
359 | if (!inst) | 357 | if (!inst) |