From 3e8afe35c36fa0e928e038667709966a71a9cfa5 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Tue, 22 Jan 2013 12:29:26 +0100 Subject: crypto: use ERR_CAST Replace PTR_ERR followed by ERR_PTR by ERR_CAST, to be more concise. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression err,x; @@ - err = PTR_ERR(x); if (IS_ERR(x)) - return ERR_PTR(err); + return ERR_CAST(x); // Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu --- crypto/cts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crypto/cts.c') diff --git a/crypto/cts.c b/crypto/cts.c index ccf9c5de3958..042223f8e733 100644 --- a/crypto/cts.c +++ b/crypto/cts.c @@ -282,9 +282,8 @@ static struct crypto_instance *crypto_cts_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); inst = ERR_PTR(-EINVAL); if (!is_power_of_2(alg->cra_blocksize)) -- cgit v1.2.3-59-g8ed1b