diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-09 12:06:21 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-10-18 18:49:41 +1100 |
commit | 27018ab14bea5ae44df4de119feefbcb37ae4f85 (patch) | |
tree | 320a0320c56094daf2b3efbdbb02df073c45ca46 /drivers/crypto/inside-secure | |
parent | 965d7286d871b622dcaaafd2e2346b11631584ff (diff) |
crypto: inside-secure - Use PTR_ERR_OR_ZERO in safexcel_xcbcmac_cra_init()
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Antoine Tenart <antoine.tenart@ack.tf>
Acked-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/inside-secure')
-rw-r--r-- | drivers/crypto/inside-secure/safexcel_hash.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c index 85c3a075f283..a07a2915fab1 100644 --- a/drivers/crypto/inside-secure/safexcel_hash.c +++ b/drivers/crypto/inside-secure/safexcel_hash.c @@ -2109,10 +2109,7 @@ static int safexcel_xcbcmac_cra_init(struct crypto_tfm *tfm) safexcel_ahash_cra_init(tfm); ctx->kaes = crypto_alloc_cipher("aes", 0, 0); - if (IS_ERR(ctx->kaes)) - return PTR_ERR(ctx->kaes); - - return 0; + return PTR_ERR_OR_ZERO(ctx->kaes); } static void safexcel_xcbcmac_cra_exit(struct crypto_tfm *tfm) |