summaryrefslogtreecommitdiff
path: root/drivers/crypto/qce
diff options
context:
space:
mode:
authorHimanshu Jha <himanshujha199640@gmail.com>2017-08-27 11:52:48 +0530
committerHerbert Xu <herbert@gondor.apana.org.au>2017-09-22 17:43:27 +0800
commit06ec1f82bfa5078928e0efaa5ed350a1dcc91631 (patch)
tree3b8b173898e0b0f40770bd5121a420f4e29f091d /drivers/crypto/qce
parent18fddf5fd2111dd670156b3dfb2dfed16d7889b4 (diff)
crypto: Use PTR_ERR_ZERO
Use PTR_ERROR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Build successfully. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qce')
-rw-r--r--drivers/crypto/qce/ablkcipher.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/qce/ablkcipher.c b/drivers/crypto/qce/ablkcipher.c
index b04b42f48366..ea4d96bf47e8 100644
--- a/drivers/crypto/qce/ablkcipher.c
+++ b/drivers/crypto/qce/ablkcipher.c
@@ -248,10 +248,7 @@ static int qce_ablkcipher_init(struct crypto_tfm *tfm)
ctx->fallback = crypto_alloc_skcipher(crypto_tfm_alg_name(tfm), 0,
CRYPTO_ALG_ASYNC |
CRYPTO_ALG_NEED_FALLBACK);
- if (IS_ERR(ctx->fallback))
- return PTR_ERR(ctx->fallback);
-
- return 0;
+ return PTR_ERR_OR_ZERO(ctx->fallback);
}
static void qce_ablkcipher_exit(struct crypto_tfm *tfm)