summaryrefslogtreecommitdiff
path: root/arch/arm64/crypto
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2019-09-03 09:54:16 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-09-09 10:35:27 +0300
commit7b865ec15ed3a1a4204537bc28bbc68202f4c52f (patch)
tree168fb3d1c55d4808cc0e974613a56fd9b9289561 /arch/arm64/crypto
parentc75c66bbaa56f130e2be095402422e56f608aa62 (diff)
downloadlinux-7b865ec15ed3a1a4204537bc28bbc68202f4c52f.tar.xz
crypto: arm64/aes - Use PTR_ERR_OR_ZERO rather than its implementation.
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to use it directly. hence just replace it. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm64/crypto')
-rw-r--r--arch/arm64/crypto/aes-glue.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/crypto/aes-glue.c b/arch/arm64/crypto/aes-glue.c
index ca0c84d56cba..2a2e0a3fc4eb 100644
--- a/arch/arm64/crypto/aes-glue.c
+++ b/arch/arm64/crypto/aes-glue.c
@@ -409,10 +409,8 @@ static int essiv_cbc_init_tfm(struct crypto_skcipher *tfm)
struct crypto_aes_essiv_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
ctx->hash = crypto_alloc_shash("sha256", 0, 0);
- if (IS_ERR(ctx->hash))
- return PTR_ERR(ctx->hash);
- return 0;
+ return PTR_ERR_OR_ZERO(ctx->hash);
}
static void essiv_cbc_exit_tfm(struct crypto_skcipher *tfm)