mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-07 16:32:17 -05:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user